All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.xp.examples.schema.createXData.js Maven / Gradle / Ivy

var schemaLib = require('/lib/xp/schema');
var assert = require('/lib/xp/testing');

/* global log*/

let resource = `
        
          Virtual X-data
          X-data description
          
false true
`; // BEGIN // Create virtual mixin. var result = schemaLib.createSchema({ name: 'myapp:mydata', type: 'XDATA', resource }); log.info('Created x-data: ' + result.name); // END assert.assertJsonEquals({ name: 'myapp:mydata', displayName: 'Virtual X-data', displayNameI18nKey: '', description: 'X-data description', descriptionI18nKey: '', createdTime: '2021-09-25T10:00:00Z', modifiedTime: '2021-09-25T10:00:00Z', resource: '\n' + ' \n' + ' Virtual X-data\n' + ' X-data description\n' + '
\n' + ' \n' + ' \n' + ' false\n' + ' true\n' + ' \n' + ' \n' + ' \n' + ' \n' + ' \n' + '
', type: 'XDATA', form: [ { 'formItemType': 'Input', 'name': 'label', 'label': 'Label', 'customText': '', 'maximize': true, 'inputType': 'TextLine', 'occurrences': { 'maximum': 2, 'minimum': 0 }, 'config': {} } ] }, result);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy