pushSchemaAsset(schema, jsonSchema, payload, path) {
    const Asset = this.namespace.getElementClass('asset');
    const schemaAsset = new Asset(JSON.stringify(jsonSchema));

    schemaAsset.classes.push('messageBodySchema');
    schemaAsset.contentType = 'application/schema+json';

    if (this.generateSourceMap) {
      this.createSourceMap(schemaAsset, path);
    }

    this.handleExternalDocs(schemaAsset, schema.externalDocs);

    payload.content.push(schemaAsset);
  }
// Create a Refract asset element containing JSON Schema and push into payload
Create a Refract asset element containing JSON Schema and push into payload
Create a Refract asset element containing JSON Schema and push into payload
pushSchemaAsset(schema, jsonSchema, payload, path) {
    const Asset = this.namespace.getElementClass('asset');
    const schemaAsset = new Asset(JSON.stringify(jsonSchema));
    schemaAsset.classes.push('messageBodySchema');
    schemaAsset.contentType = 'application/schema+json';
    if (this.generateSourceMap) {
      this.createSourceMap(schemaAsset, path);
    }
    this.handleExternalDocs(schemaAsset, schema.externalDocs);
    payload.content.push(schemaAsset);
  }
pushSchemaAsset ( schema , jsonSchema , payload , path ) { const Asset = this . namespace . getElementClass ( 'asset' ) ; const schemaAsset = new Asset ( JSON . stringify ( jsonSchema ) ) ; schemaAsset . classes . push ( 'messageBodySchema' ) ; schemaAsset . contentType = 'application/schema+json' ; if ( this . generateSourceMap ) { this . createSourceMap ( schemaAsset , path ) ; } this . handleExternalDocs ( schemaAsset , schema . externalDocs ) ; payload . content . push ( schemaAsset ) ; }
Create a Refract asset element containing JSON Schema and push into payload
Create a Refract asset element containing JSON Schema and push into payload