{ "$id": "https://raw.githubusercontent.com/Ouest-France/platform/master/packages/schemas/defs.json", "definitions": { "Ident": { "type": "string", "pattern": "^[a-z-]+$", "minLength": 3, "maxLength": 50 }, "BasicSemVer": { "type": "string", "title": "Basic Semantic version", "description": "MAJOR.MINOR.PATCH, see https://semver.org/", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$", "examples": ["0.0.1", "1.0.0"] }, "BlockName": { "type": "string", "title": "Functional ID describing the Block", "description": "The functional ID must be unique for CMS", "default": "", "examples": [ "editorial/article--list", "editorial/article--detail", "meteo/meteo--detail" ] }, "UIRepresentationPropertyConfiguration": { "description": "Extend ui configuration field with pure UserInterface representation configuration (example : specify placeholder from standard component, use slider component to set number instead simple number input, use color picker component to set string or yet use external widget).", "type": "object", "additionalProperties": false, "minProperties": 1, "oneOf": [ { "required": ["widget"], "not": {"required": ["component"]} }, { "required": ["component"], "not": {"required": ["widget"]} } ], "properties": { "widget": { "description": "Specify widget to use. Widget is similar to a component except it is owned by a BlockProvider and is not part of the standard components available in the platform.", "additionalProperties": false, "required": ["name", "version"], "properties": { "name": { "type": "string", "description": "name of widget to use for this configuration field." }, "version": { "type": "string", "description": "version of widget." } } }, "component": { "description": "Allow to extend component configuration with representation parameters (example: placeholder) or to use another component than the default one.", "additionalProperties": false, "minProperties": 1, "properties": { "name": { "type": "string", "enum": [ "slider" ], "description": "name of component to use for this configuration field (example: slider)" } } } } }, "UIProperty": { "type": "object", "required": ["type", "title"], "additionalProperties": false, "properties": { "type": { "description": "basic type of configuration field", "anyOf": [ { "$ref": "#/definitions/UIPropertyBasicTypes" } ] }, "title": { "description": "Label of configuration field", "type": "string" }, "description": { "description": "description of configuration field", "type": "string" }, "maximum": { "type": "number" }, "minimum": { "type": "number" }, "maxLength": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" }, "minLength": { "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, "enum": { "type": "array", "items": { "type": [ "string", "number" ] }, "minItems": 1, "uniqueItems": true }, "format": { "description": "subset of html input type to describe input behavior", "anyOf": [ { "$ref": "#/definitions/UIInputFormat" } ] }, "x-ui-configuration": { "$ref": "#/definitions/UIRepresentationPropertyConfiguration" }, "default": {} }, "dependencies": { "minimum": { "properties": { "type": { "enum": ["number"] } } }, "maximum": { "properties": { "type": { "enum": ["number"] } } }, "maxLength": { "properties": { "type": { "enum": ["string"] } } }, "format": { "properties": { "type": { "enum": ["string"] } } }, "enum": { "properties": { "type": { "enum": ["string", "number"] } } }, "pattern": { "properties": { "type": { "enum": ["string"] } } }, "minLength": { "properties": { "type": { "enum": ["string"] } } } }, "oneOf": [ { "properties": { "type": {"enum": ["boolean"] } } }, { "properties": { "type": {"enum": ["string"] } } }, { "properties": { "type": {"enum": ["number"] } } } ] }, "BlockType": { "$id": "/properties/type", "type": "string", "title": "Type de Block", "description": "BlockType can be Display or Navigation.\nThe BlockType typology is :\n- Navigation : dynamic Block with user action which requires a page reloading. Example : search form, pagination for the news Block, etc.\n- Display : static Block without user interaction (no state change according to the current URL, state depends only on config parameters)", "enum": ["Display", "Navigation"] }, "BlockTemplateEngine": { "type": "string", "title": "Template engine", "description": "The template engine to use to render this Block. *php-twig* is deprecated and will be removed, use 'mustache' instead, see: https://mustache.github.io", "enum": ["mustache", "php-twig"] }, "BlockTemplateTargetFormat": { "type": "string", "title": "Template target format", "description": "The template target format to use to render this Block", "enum": ["html", "amp"] }, "UIPropertyBasicTypes": { "enum": [ "number", "string", "boolean" ] }, "UIInputFormat": { "enum": [ "email", "text", "date" ] }, "UISection": { "type": "object", "title": "UI configuration contract group", "description": "Define configuration set contract", "required": [ "properties", "title" ], "properties": { "title": { "description": "Title of form tab to display PageBuilder", "type": "string" }, "description": { "description": "Description of form tab. Example: 'Server administration configuration'", "type": "string" }, "required": { "description": "list mandatory configuration field", "$ref": "http://json-schema.org/draft-06/schema#/definitions/stringArray" }, "x-section-type": { "description": "Section type is used to categorize sections by impacting their rendering and access. This information is primarily intended for formatting forms (shortcut icon, appearance, ...). This field is a free string and its processing is carried by contract consumers (PageBuilder)", "type": "string" }, "x-properties-order": { "description": "Properties display order (if a property is not present, it appears at the end of the generated form)", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "properties": { "minProperties": 1, "type": "object", "additionalProperties": { "$ref": "#/definitions/UIProperty" } } }, "additionalProperties": false }, "UISchema": { "title": "UISchema declaration", "description": "Specify in UISchema format how the parameters should be rendered in PageBuilder.", "type": "object", "properties": { "sections": { "type": "array", "description": "list of configuration set contract. Allows configuration to be consolidated by interest", "items": { "$ref": "#/definitions/UISection" }, "default": [] } }, "additionalProperties": false }, "BlockProviderConfig": { "definitions": {}, "$schema": "http://json-schema.org/draft-06/schema#", "$id": "BlockProviderConfig", "type": "array", "title": "BlockProviderConfig", "description": "BlockProvider response format to declare BlockConfig", "items": { "type": "object", "$ref": "BlockConfig" }, "uniqueItems": true, "minItems": 1 }, "ConfigMap": { "definitions": {}, "$schema": "http://json-schema.org/draft-06/schema", "$id": "ConfigMap", "type": "object", "title": "ConfigMap", "description": "Key/Value dataset", "maxProperties": 1024, "additionalProperties": true } } }