updated schema for contentbuilder and refactored code
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
84
schemas/api-config/definitions.json
Normal file
84
schemas/api-config/definitions.json
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"$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_]+)*$"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user