artifactValidator

Assemble and validate application artifacts using JSON schema

Contents

Module Members

Types

Module Members

create()

Create an artifact validator instance.

Example:

const validator = laxarTooling.artifactValidator.create();
Returns
Type Description
ArtifactValidator the created artifact validator

validateArtifacts( artifacts )

Validate artifacts returned by the ArtifactCollector.

Example:

collector.collectArtifacts( { flows: 'main' } )
   .then( validator.validateArtifacts );
Parameters
Property Type Description
artifacts Object artifacts returned by ArtifactCollector#collectArtifacts
Returns
Type Description
Promise.<Object> the validated artifacts

validateFlows( validators, flows )

Parameters
Property Type Description
validators Object validators created by validators#create
flows Array.<Object> the flow artifacts to validate
Returns
Type Description
Promise.<Array> the validated flows

validatePages( pageAssembler, pages )

Parameters
Property Type Description
pageAssembler PageAssembler the page assembler handles validation of the individual pages
pages Array.<Object> the page artifacts to validate
Returns
Type Description
Promise.<Array> the validated pages

validateWidgets( validators, widgets )

Parameters
Property Type Description
validators Object validators created by validators#create
widgets Array.<Object> the widget artifacts to validate
Returns
Type Description
Promise.<Array> the validated widgets

Types

ArtifactValidator