tibi-types/schemas/api-config/definitions.json
Sebastian Frank 14da32bac6
All checks were successful
continuous-integration/drone/push Build is passing
updated schema for contentbuilder and refactored code
2022-11-18 18:59:36 +00:00

85 lines
2.6 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"evalObject": {
"type": "object",
"properties": {
"eval": {
"type": "string",
"description": "js code which must return same schema as value if directly defined"
}
}
},
"i18nString": {
"oneOf": [
{
"type": "object",
"patternProperties": {
"^[a-z]$": {
"type": "string"
}
}
},
{
"type": "string"
}
]
},
"evalExpressions": {
"oneOf": [
{
"type": "object",
"additionalProperties": true,
"properties": {
"twig": {
"type": "string",
"description": "twig template"
},
"projection": {
"type": "string",
"description": "query projection to use"
}
},
"required": ["twig"]
},
{
"type": "object",
"additionalProperties": true,
"properties": {
"eval": {
"type": "string",
"description": "javascript code"
},
"projection": {
"type": "string",
"description": "query projection to use"
}
},
"required": ["eval"]
}
]
},
"fieldSource": {
"oneOf": [
{
"$ref": "#/definitions/fieldPath"
},
{
"type": "object",
"properties": {
"source": {
"$ref": "#/definitions/fieldPath"
}
}
}
]
},
"fieldPath": {
"type": "string",
"description": "field, sub fields separated with dot (.)",
"pattern": "^[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*$"
}
}
}