feat(schemas): format JSON schema properties for better readability
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-11 13:34:18 +00:00
parent c2a54a4474
commit afa7c9b238
2 changed files with 350 additions and 197 deletions

View File

@@ -3,7 +3,6 @@
"title": "JSON Schema tibi-server field meta configuration",
"description": "tibi-server field meta linter",
"type": "object",
"anyOf": [
{
"$ref": "#/definitions/minimum"
@@ -11,12 +10,19 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget|inputProps$": { "$comment": "stub for allOf" }
"^x-.*|widget|inputProps$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": { "enum": ["text", "checkbox"] }
"widget": {
"enum": [
"text",
"checkbox"
]
}
}
},
{
@@ -24,23 +30,30 @@
"inputProps": {
"type": "object",
"properties": {
"multiline": { "type": "boolean" }
"multiline": {
"type": "boolean"
}
}
}
}
}
]
},
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": { "enum": ["richtext", "richText"] }
"widget": {
"enum": [
"previewBasedObjectArray"
]
}
}
}
]
@@ -48,11 +61,35 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget|choices$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"required": ["choices"],
"properties": {
"widget": {
"enum": [
"richtext",
"richText"
]
}
}
}
]
},
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget|choices$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"required": [
"choices"
],
"properties": {
"widget": {
"enum": [
@@ -121,7 +158,10 @@
"$ref": "https://raw.githubusercontent.com/rcorp/css-schema/master/schema.json"
}
},
"required": ["id", "name"]
"required": [
"id",
"name"
]
}
}
]
@@ -133,13 +173,18 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": {
"enum": ["date", "datetime"]
"enum": [
"date",
"datetime"
]
}
}
}
@@ -148,13 +193,18 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": {
"enum": ["file", "image"]
"enum": [
"file",
"image"
]
}
}
}
@@ -163,13 +213,17 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": {
"enum": ["json"]
"enum": [
"json"
]
}
}
}
@@ -178,13 +232,17 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget$": { "$comment": "stub for allOf" }
"^x-.*|widget$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": {
"enum": ["tabs"]
"enum": [
"tabs"
]
}
}
}
@@ -193,13 +251,17 @@
{
"$ref": "#/definitions/minimum",
"patternProperties": {
"^x-.*|widget|foreign$": { "$comment": "stub for allOf" }
"^x-.*|widget|foreign$": {
"$comment": "stub for allOf"
}
},
"allOf": [
{
"properties": {
"widget": {
"enum": ["foreignKey"]
"enum": [
"foreignKey"
]
},
"foreign": {
"additionalProperties": false,
@@ -229,7 +291,9 @@
"render": {
"description": "field name or eval object which returns string",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
},
@@ -263,12 +327,16 @@
{
"properties": {
"widget": {
"enum": ["contentbuilder"]
"enum": [
"contentbuilder"
]
},
"baseHref": {
"description": "base href for relative links inside of ContentBuilder",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObject"
}
@@ -277,10 +345,14 @@
"cssHref": {
"description": "href to css file for use with ContentBuilder",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"type": "array",
"items": { "type": "string" }
"items": {
"type": "string"
}
},
{
"$ref": "definitions.json#/definitions/evalObject"
@@ -307,7 +379,10 @@
"items": {
"type": "object",
"additionalProperties": false,
"required": ["placeholder", "label"],
"required": [
"placeholder",
"label"
],
"properties": {
"placeholder": {
"type": "string",
@@ -327,7 +402,9 @@
"style": {
"description": "css style to inject into ContentBuilder",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObject"
}
@@ -355,7 +432,9 @@
"previewUnfolded": {
"description": "preview for unfolded array element",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
@@ -364,7 +443,9 @@
"previewFolded": {
"description": "preview for folded array element",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
@@ -378,22 +459,35 @@
},
"direction": {
"type": "string",
"enum": ["horizontal", "vertical"]
"enum": [
"horizontal",
"vertical"
]
},
"pathStep": {
"type": "object",
"properties": {
"title": {
"type": "string",
"const": "Zeile"
"type": "string"
},
"icon": {
"type": "string",
"const": "viewSequentialOutline"
"type": "string"
}
},
"required": ["title", "icon"]
"required": [
"title"
]
},
"preview": {
"description": "preview configuration for array elements",
"oneOf": [
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObjectWithRaw"
}
]
},
"metaElements": {
"oneOf": [
@@ -419,7 +513,9 @@
"type": "string"
}
},
"required": ["source"]
"required": [
"source"
]
},
{
"type": "array",
@@ -435,7 +531,9 @@
"const": "layout"
}
},
"required": ["source"]
"required": [
"source"
]
}
]
},
@@ -479,13 +577,14 @@
}
}
},
"required": ["tabs"]
"required": [
"tabs"
]
}
}
}
]
},
"openapi": {
"type": "object"
},
@@ -493,7 +592,6 @@
"$ref": "definitions.json#/definitions/i18nString",
"description": "label for field"
},
"addElementLabel": {
"$ref": "definitions.json#/definitions/i18nString",
"description": "label for adding element to list"
@@ -522,11 +620,13 @@
}
}
},
"css": {
"description": "css styles for field widgets",
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{
"$comment": "for include tag",
"type": "string"
},
{
"type": "object",
"properties": {
@@ -591,7 +691,9 @@
"dependsOn": {
"description": "depends on rule",
"oneOf": [
{ "type": "string" },
{
"type": "string"
},
{
"type": "object",
"properties": {
@@ -640,15 +742,24 @@
"type": "object",
"additionalProperties": true
},
"defaultValue": {
"description": "default value or code to get the value",
"oneOf": [
{ "type": "array" },
{ "type": "string" },
{ "type": "null" },
{ "type": "boolean" },
{ "type": "number" },
{
"type": "array"
},
{
"type": "string"
},
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "object",
"properties": {
@@ -712,7 +823,9 @@
},
"css": {
"anyOf": [
{ "type": "string" },
{
"type": "string"
},
{
"$ref": "https://raw.githubusercontent.com/rcorp/css-schema/master/schema.json"
},
@@ -728,4 +841,4 @@
]
}
}
}
}