UNPKG

@unito/integration-api

Version:

The Unito Integration API

112 lines (111 loc) 2.63 kB
{ "$id": "https://unito.io/integration_api/fieldSchema.schema.json", "title": "FieldSchema", "allOf": [ { "type": "object", "required": ["name", "type", "label"], "additionalProperties": false, "properties": { "name": { "type": "string", "pattern": "^[a-zA-Z0-9_-]*$", "minLength": 1, "maxLength": 100 }, "type": { "$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/fieldValueType" }, "label": { "type": "string", "minLength": 1, "maxLength": 100 }, "semantic": { "$ref": "https://unito.io/integration_api/definitions.schema.json#/$defs/semantic" }, "fields": { "type": "array", "items": { "$ref": "https://unito.io/integration_api/fieldSchema.schema.json" } }, "optionalValues": { "type": "array", "items": { "type": "object", "required": ["label", "value"], "additionalProperties": false, "properties": { "label": { "type": "string", "minLength": 1, "maxLength": 100 }, "value": { "anyOf": [{ "type": ["string"] }, { "type": ["number"] }] } } } }, "reference": { "$ref": "https://unito.io/integration_api/referenceRelation.schema.json" }, "info": { "type": "string" }, "readOnly": { "type": "boolean" }, "isArray": { "type": "boolean" }, "nullable": { "type": "boolean", "default": true } } }, { "if": { "type": "object", "properties": { "type": { "const": "blob" } }, "required": ["type"] }, "then": { "type": "object", "properties": { "isArray": { "enum": [false] } } } }, { "if": { "type": "object", "properties": { "type": { "const": "reference" } }, "required": ["type"] }, "then": { "type": "object", "required": ["reference"] } }, { "if": { "type": "object", "properties": { "type": { "const": "object" } }, "required": ["type"] }, "then": { "type": "object", "required": ["fields"] } } ] }