@ui5/project/validation/validator

Description:
  • A collection of validation related APIs
Source:
A collection of validation related APIs

Methods

(static) validate(options) → {Promise.<undefined>}

Description:
  • Validates the given ui5 configuration.
Source:
Parameters:
Name Type Description
options object
Properties
Name Type Attributes Description
config object UI5 Configuration to validate
project object Project information
Properties
Name Type Description
id string ID of the project
yaml object <optional>
YAML information
Properties
Name Type Attributes Default Description
path string Path of the YAML file
source string Content of the YAML file
documentIndex number <optional>
0 Document index in case the YAML file contains multiple documents
Throws:
Rejects with a ValidationError when the validation fails.
Type
@ui5/project/validation/ValidationError
Returns:
Returns a Promise that resolves when the validation succeeds
Type
Promise.<undefined>

(static) validateWorkspace(options) → {Promise.<undefined>}

Description:
  • Validates the given ui5-workspace configuration.
Source:
Parameters:
Name Type Description
options object
Properties
Name Type Attributes Description
config object ui5-workspace Configuration to validate
yaml object <optional>
YAML information
Properties
Name Type Attributes Default Description
path string Path of the YAML file
source string Content of the YAML file
documentIndex number <optional>
0 Document index in case the YAML file contains multiple documents
Throws:
Rejects with a ValidationError when the validation fails.
Type
@ui5/project/validation/ValidationError
Returns:
Returns a Promise that resolves when the validation succeeds
Type
Promise.<undefined>