Skip to main content

Intro

A full schema generates views of JSON data that you can fetch from the Delivery API.

In a full schema you can map properties, reference other full or partial schemas, define routes like URLs and more.

JavaScript full schema example
/** @type {Enterspeed.FullSchema} */
export default {
triggers: function(context) {
context.triggers('cms', ['page']);
},
routes: function(sourceEntity, context) {
context.url(sourceEntity.url);
},
properties: function (sourceEntity, context) {
return {
title: sourceEntity.properties.title,
blocks: context.partial("blocks", sourceEntity.properties.blocks),
aboutUsPage: context.reference("page").byOriginId(sourceEntity.properties.aboutUsPage.id),
};
}
}