lib.xp.examples.schema.getSite.js Maven / Gradle / Ivy
var schemaLib = require('/lib/xp/schema');
var assert = require('/lib/xp/testing');
/* global log*/
// BEGIN
// Fetch virtual site.
var result = schemaLib.getSite({
application: 'myapp'
});
log.info('Fetched site: myapp');
// END
assert.assertJsonEquals({
application: 'myapp',
resource: ' ',
modifiedTime: '2021-02-25T10:44:33.170079900Z',
form: [
{
'formItemType': 'Input',
'name': 'input',
'label': 'Input',
'maximize': true,
'inputType': 'Double',
'occurrences': {
'maximum': 1,
'minimum': 0
},
'config': {}
}
],
xDataMappings: [
{
'name': 'myapplication:my',
'optional': false
}
]
}, result);