{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "field.schema.json", "title": "Tibi field config", "$ref": "#/definitions/field", "definitions": { "field": { "type": "object", "additionalProperties": false, "patternProperties": { "^x-": {} }, "properties": { "name": { "type": "string", "pattern": "^[0-9A-Za-z_]+$" }, "type": { "type": "string", "enum": [ "string", "string[]", "number", "number[]", "boolean", "object", "object[]", "file", "file[]", "date", "any" ] }, "index": { "type": "array", "items": { "type": "string", "enum": [ "single", "unique", "text", "sparse", "background" ] } }, "subFields": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "oneOf": [ { "type": "string" }, { "$ref": "#/definitions/field" } ] } } ] }, "validator": { "type": "object", "additionalProperties": false, "properties": { "required": { "type": "boolean" }, "allowZero": { "type": "boolean" }, "format": { "type": "string", "enum": ["email", "url", "uuid", "slug"] }, "eval": { "type": "string" }, "minItems": { "type": "number" }, "maxItems": { "type": "number" }, "minLength": { "type": "number" }, "maxLength": { "type": "number" }, "pattern": { "type": "string" }, "min": { "type": "number" }, "max": { "type": "number" }, "minDate": { "type": "string" }, "maxDate": { "type": "string" }, "minFileSize": { "type": "string" }, "in": { "type": "array" }, "maxFileSize": { "type": "string" }, "accept": { "type": "array", "items": { "type": "string" } }, "image": { "type": "object", "additionalProperties": false, "properties": { "minWidth": { "type": "number" }, "maxWidth": { "type": "number" }, "minHeight": { "type": "number" }, "maxHeight": { "type": "number" }, "allowNonImages": { "type": "boolean" }, "allowUnknownDimensions": { "type": "boolean" } } } } }, "readonly": { "$ref": "defs.schema.json#/definitions/boolOrEval" }, "hidden": { "$ref": "defs.schema.json#/definitions/boolOrEval" }, "strictFields": { "type": "boolean" }, "meta": { "$ref": "field-meta.schema.json" } }, "required": [ "name", "type" ] } } }