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

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

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

/* global log*/

// BEGIN
// Fetch virtual x-data type.
var result = schemaLib.getSchema({
    name: 'myapp:mydata',
    type: 'XDATA'
});

log.info('Fetched x-data: ' + result.name);

// END


assert.assertJsonEquals({
    name: 'media:cameraInfo',
    displayName: 'Photo Info',
    displayNameI18nKey: 'media.cameraInfo.displayName',
    modifiedTime: '1970-01-06T03:07:14.242Z',
    resource: '',
    type: 'XDATA',
    form: []
}, result);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy