🔨 refactor(fieldMeta.json): remove unnecessary code duplication and reorganize fieldMeta schema

🌟 feat(fieldMeta.json): add new properties for folding configuration, hiding field widget, direction, pathStep, and metaElements
The changes in the fieldMeta.json schema remove unnecessary code duplication by removing a section that was already defined elsewhere. The schema is also reorganized to group related properties together for better readability. New properties for folding configuration, hiding field widget, direction, pathStep, and metaElements are added to enhance the flexibility and customization options of the fieldMeta schema.
This commit is contained in:
Robin Grenzdörfer 2023-08-06 09:35:49 +00:00
parent 791ef2639c
commit beff5c2fe1

View File

@ -31,161 +31,7 @@
}
]
},
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget|inputProps$": { "$comment": "stub for allOf" }
},
"allOf": [
{
"properties": {
"widget": { "enum": ["object", "object[]", "grid"] }
}
},
{
"properties": {
"folding": {
"type": "object",
"description": "folding configuration for array fields",
"additionalProperties": false,
"properties": {
"previewUnfolded": {
"description": "preview for unfolded array element",
"oneOf": [
{ "type": "string" },
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
]
},
"previewFolded": {
"description": "preview for folded array element",
"oneOf": [
{ "type": "string" },
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
]
}
}
},
"hide": {
"type": "boolean",
"description": "hide field widget"
},
"direction": {
"type": "string",
"enum": ["horizontal", "vertical"]
},
"pathStep": {
"type": "object",
"properties": {
"title": {
"type": "string",
"const": "Zeile"
},
"icon": {
"type": "string",
"const": "viewSequentialOutline"
}
},
"required": ["title", "icon"]
},
"metaElements": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": ["source"]
},
{
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "layout"
}
},
"required": ["source"]
}
]
},
{
"type": "object",
"properties": {
"tablist": {
"type": "object",
"properties": {
"tabs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"subFields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
}
},
"required": [
"name",
"label",
"subFields"
]
}
}
},
"required": ["tabs"]
}
}
}
]
}
}
}
]
},
{
"$ref": "#/definitions/minimum",
"patternProperties": {
@ -501,6 +347,145 @@
}
},
"properties": {
"folding": {
"type": "object",
"description": "folding configuration for array fields",
"additionalProperties": false,
"properties": {
"previewUnfolded": {
"description": "preview for unfolded array element",
"oneOf": [
{ "type": "string" },
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
]
},
"previewFolded": {
"description": "preview for folded array element",
"oneOf": [
{ "type": "string" },
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
]
}
}
},
"hide": {
"type": "boolean",
"description": "hide field widget"
},
"direction": {
"type": "string",
"enum": ["horizontal", "vertical"]
},
"pathStep": {
"type": "object",
"properties": {
"title": {
"type": "string",
"const": "Zeile"
},
"icon": {
"type": "string",
"const": "viewSequentialOutline"
}
},
"required": ["title", "icon"]
},
"metaElements": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": ["source"]
},
{
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "layout"
}
},
"required": ["source"]
}
]
},
{
"type": "object",
"properties": {
"tablist": {
"type": "object",
"properties": {
"tabs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"label": {
"type": "string"
},
"subFields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"source": {
"type": "string"
}
},
"required": [
"source"
]
}
}
},
"required": [
"name",
"label",
"subFields"
]
}
}
},
"required": ["tabs"]
}
}
}
]
},
"openapi": {
"type": "object"
},