🗃️ Adds descriptors to schema

This commit is contained in:
Alicia Sykes 2021-10-24 17:35:29 +01:00
parent 91956d88a2
commit f450094235
1 changed files with 18 additions and 0 deletions

View File

@ -483,6 +483,7 @@
"type": "array", "type": "array",
"description": "Array of sections, containing items", "description": "Array of sections, containing items",
"items": { "items": {
"title": "Items",
"type": "object", "type": "object",
"required": [ "required": [
"name", "name",
@ -491,19 +492,23 @@
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"name": { "name": {
"title": "Section Name",
"type": "string", "type": "string",
"description": "Title/ heading for a section" "description": "Title/ heading for a section"
}, },
"icon": { "icon": {
"title": "Section Icon",
"type": "string", "type": "string",
"description": "Icon will be displayed next to title" "description": "Icon will be displayed next to title"
}, },
"displayData": { "displayData": {
"title": "Display Data",
"type": "object", "type": "object",
"additionalProperties": false, "additionalProperties": false,
"description": "Optional meta data for customizing a section", "description": "Optional meta data for customizing a section",
"properties": { "properties": {
"sortBy": { "sortBy": {
"title": "Sort By",
"type": "string", "type": "string",
"enum": [ "enum": [
"default", "default",
@ -517,19 +522,23 @@
"description": "How to sort items within the section. By default items are displayed in the order in which they are listed in within the config" "description": "How to sort items within the section. By default items are displayed in the order in which they are listed in within the config"
}, },
"collapsed": { "collapsed": {
"title": "Is Collapsed?",
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "If true, section needs to be clicked to open" "description": "If true, section needs to be clicked to open"
}, },
"color": { "color": {
"title": "Color",
"type": "string", "type": "string",
"description": "Hex code, or HTML color for section fill" "description": "Hex code, or HTML color for section fill"
}, },
"customStyles": { "customStyles": {
"title": "Custom Styles",
"type": "string", "type": "string",
"description": "CSS overides for section container" "description": "CSS overides for section container"
}, },
"itemSize": { "itemSize": {
"title": "Item Size",
"type": "string", "type": "string",
"enum": [ "enum": [
"small", "small",
@ -540,6 +549,7 @@
"description": "Size of items within the section" "description": "Size of items within the section"
}, },
"rows": { "rows": {
"title": "Num Rows",
"type": "number", "type": "number",
"minimum": 1, "minimum": 1,
"maximum": 5, "maximum": 5,
@ -547,6 +557,7 @@
"description": "The amount of space that the section spans vertically" "description": "The amount of space that the section spans vertically"
}, },
"cols": { "cols": {
"title": "Num Cols",
"type": "number", "type": "number",
"minimum": 1, "minimum": 1,
"maximum": 5, "maximum": 5,
@ -554,6 +565,7 @@
"description": "The amount of space that the section spans horizontally" "description": "The amount of space that the section spans horizontally"
}, },
"sectionLayout": { "sectionLayout": {
"title": "Layout Type",
"type": "string", "type": "string",
"enum": [ "enum": [
"grid", "grid",
@ -563,18 +575,21 @@
"description": "If set to grid, items have uniform width, and itemCount can be set" "description": "If set to grid, items have uniform width, and itemCount can be set"
}, },
"itemCountX": { "itemCountX": {
"title": "Item Count X",
"type": "number", "type": "number",
"minimum": 1, "minimum": 1,
"maximum": 12, "maximum": 12,
"description": "Number of items per column" "description": "Number of items per column"
}, },
"itemCountY": { "itemCountY": {
"title": "Item Count Y",
"type": "number", "type": "number",
"minimum": 1, "minimum": 1,
"maximum": 12, "maximum": 12,
"description": "Number of items per row" "description": "Number of items per row"
}, },
"hideForUsers": { "hideForUsers": {
"title": "Hide for Users",
"type": "array", "type": "array",
"description": "Section will be visible to all users, except for those specified in this list", "description": "Section will be visible to all users, except for those specified in this list",
"items": { "items": {
@ -583,6 +598,7 @@
} }
}, },
"showForUsers": { "showForUsers": {
"title": "Show for Users",
"type": "array", "type": "array",
"description": "Section will be hidden from all users, except for those specified in this list", "description": "Section will be hidden from all users, except for those specified in this list",
"items": { "items": {
@ -591,6 +607,7 @@
} }
}, },
"hideForGuests": { "hideForGuests": {
"title": "Hide for Guests?",
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "If set to true, section will be visible for logged in users, but not for guests" "description": "If set to true, section will be visible for logged in users, but not for guests"
@ -598,6 +615,7 @@
} }
}, },
"items": { "items": {
"title": "Items",
"type": "array", "type": "array",
"description": "Array of items to display with a section", "description": "Array of items to display with a section",
"items": { "items": {