Files
tibi-types/schemas/config/field-meta.schema.json
T
apairon 0fa213f3b6 feat(schema): templateProps + schemaRef + designGuide + blockStudio
Vorbereitung fuer dynamische Pagebuilder-Bloecke (nova feature/dynamic-pagebuilder-blocks):
- field-meta: Widget templateProps, meta.schemaRef {ref?, field required}
  (statische subFields / Sibling-Schema / FK-Schema fuer type:any-Felder)
- collection-meta: meta.designGuide (i18nText) als KI-Hinweis pro Collection
- collection-meta: viewHint.blockStudio {previewField, lint, renderer.file}
  (Spezial-View wie navigation/media, inkl. oneOf-Zweig)
2026-09-30 20:36:22 +00:00

322 lines
6.9 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "field-meta.schema.json",
"title": "Tibi field meta config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"widget": {
"type": "string",
"enum": [
"text",
"textarea",
"number",
"checkbox",
"switch",
"select",
"selectArray",
"chipArray",
"date",
"datetime",
"file",
"image",
"json",
"richtext",
"html",
"foreignKey",
"foreignKeyChipArray",
"foreignFile",
"foreignMedia",
"pagebuilder",
"pageBuilder",
"templateProps",
"containerLessObject",
"containerLessObjectArray",
"color"
]
},
"i18n": {
"const": false
},
"helperText": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"hideLabel": {
"type": "boolean"
},
"hide": {
"type": "boolean"
},
"protected": {
"$ref": "defs.schema.json#/definitions/boolOrUiCondition"
},
"position": {
"type": "string",
"pattern": "^(main|sidebar|sidebar:.+)$"
},
"section": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"containerProps": {
"type": "object",
"additionalProperties": false,
"properties": {
"class": {
"type": "string"
},
"layout": {
"type": "object",
"additionalProperties": false,
"properties": {
"breakBefore": {
"type": "boolean"
},
"breakAfter": {
"type": "boolean"
},
"size": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"default": {
"type": "string"
},
"small": {
"type": "string"
},
"large": {
"type": "string"
}
}
}
]
}
}
}
}
},
"defaultValue": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array"
},
{
"type": "object"
}
]
},
"dependsOn": {
"$ref": "defs.schema.json#/definitions/uiCondition"
},
"inputProps": {
"type": "object",
"additionalProperties": true
},
"choices": {
"$ref": "defs.schema.json#/definitions/choices"
},
"foreign": {
"type": "object",
"additionalProperties": false,
"properties": {
"collection": {
"type": "string"
},
"id": {
"type": "string"
},
"sort": {
"type": "string"
},
"projection": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"createDefaults": {
"type": "object",
"additionalProperties": true
},
"subNavigation": {
"type": "integer",
"minimum": 0
},
"render": {
"$ref": "defs.schema.json#/definitions/foreignRender"
},
"autoFill": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"collection"
]
},
"downscale": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number"
},
"maxHeight": {
"type": "number"
},
"quality": {
"type": "number"
}
}
},
"imageEditor": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"crop": {
"type": "boolean"
},
"rotate": {
"type": "boolean"
},
"flip": {
"type": "boolean"
},
"focalPoint": {
"type": "boolean"
},
"adjust": {
"type": "boolean"
},
"palette": {
"type": "boolean"
}
}
}
]
},
"drillDown": {
"type": "boolean"
},
"pageSize": {
"type": "integer",
"minimum": 0
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"addElementLabel": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"filter": {
"oneOf": [
{
"type": "boolean",
"description": "Set to true to opt-in this field as a filterable field in the admin UI, or false to explicitly exclude it."
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"default",
"select",
"bool",
"boolean",
"input",
"number",
"foreignKey"
]
},
"facets": {
"type": "boolean"
}
}
}
]
},
"pagebuilder": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultViewport": {
"$ref": "defs.schema.json#/definitions/pagebuilderViewport"
},
"blockTypeField": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"overlay",
"inline",
"both"
]
},
"blockRegistry": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
}
}
},
"schemaRef": {
"type": "object",
"additionalProperties": false,
"properties": {
"ref": {
"type": "string"
},
"field": {
"type": "string"
}
},
"required": [
"field"
]
},
"openapi": {
"$ref": "openapi.schema.json#/definitions/fieldOpenapi"
}
}
}