-
Notifications
You must be signed in to change notification settings - Fork 286
Properties Schema Examples v1.0.0
Guy Willis edited this page Jan 18, 2023
·
7 revisions
Following on from the property schema dissection, lets take a look at some examples of the differing types of schemas that can be used in v1.0.0 Authoring Tool schema.
"title": {
"type": "string",
"title": "Title",
"default": "Untitled",
"_adapt": {
"translatable": true
}
},
"body": {
"type": "string",
"title": "Body",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"_left": {
"type": "number",
"title": "Pin horizontal position (%)",
"description": "",
"default": 0
},
"_isMobileTextBelowImage": {
"type": "boolean",
"title": "Move text area below image on mobile",
"description": "If enabled, on mobile, the text area drops below the image instead of being behind the strapline button",
"default": false,
"_adapt": {
"isSetting": true
}
},
"src": {
"type": "string",
"isObjectId": true,
"title": "Source",
"description": "This is the image that appears behind the pins",
"_backboneForms": {
"type": "Asset",
"media": "image"
}
},
"_setCompletionOn": {
"type": "string",
"title": "Completion criteria",
"description": "Whether completion is based on the learner having viewed all the narrative items - or just having viewed the component",
"default": "allItems",
"enum": [
"inview",
"allItems"
],
"_backboneForms": "Select"
},
"_graphic": {
"type": "object",
"title": "Graphic",
"default": {},
"required": [
"src"
],
"properties": {
...
}
}
"_items": {
"type": "array",
"title": "Items",
"items": {
...
}
}
The _adapt
keyword is used to group schema properties which are non-standard to the JSON schema specification and related to various Adapt-specific features (predominantly the).
"_adapt": {
"editorOnly": true,
"inputType": "Select",
"isSetting": true,
"showInUi": false,
"translatable": true
}
Property | Description |
---|---|
editorOnly |
Determines whether the attribute should be included in output JSON |
inputType |
Determines the type of input rendered in forms (see Backbone Forms docs) |
isSetting |
Attribute will appear in the ‘Settings’ section of the form |
showInUi |
Determines whether the attribute will be rendered in forms |
translatable |
Whether the attribute is a language-specific string for translation |