tibi-types/schemas/api-config/collection.json
Sebastian Frank 5fccea7513
All checks were successful
continuous-integration/drone/push Build is passing
defaultValue, dependsOn, subNavigation
2022-10-18 16:48:16 +02:00

124 lines
4.2 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema tibi-server collection configuration",
"description": "tibi-server collection linter",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x\\-": {
"description": "template property"
}
},
"properties": {
"name": {
"type": "string",
"description": "collection name, part of api path"
},
"defaultLanguage": {
"type": "string",
"description": "default language for database text index"
},
"uploadPath": {
"type": "string",
"description": "relative to config.yml, path for file uploads"
},
"meta": {
"type": "object",
"description": "meta object used for admin ui configuration",
"additionalProperties": true,
"allOf": [{ "$ref": "collectionNavigation.json" }],
"properties": {
"rowIdentTpl": {
"description": "template which evaluates to short string to identify entry in pe. select boxes",
"$ref": "field.json#/definitions/evalExpressions"
},
"subNavigation": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{
"type": "array",
"description": "sub navigation of collection",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "collectionNavigation.json"
}
]
}
}
]
}
}
},
"projections": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{ "$ref": "projections.json" }
]
},
"permissions": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{ "$ref": "permissions.json" }
]
},
"hooks": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{ "$ref": "hooks.json" }
]
},
"imageFilter": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{ "$ref": "imageFilter.json" }
]
},
"fields": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{
"type": "array",
"description": "fields of collection",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "field.json"
}
]
}
}
]
},
"indexes": {
"oneOf": [
{ "$comment": "for include tag", "type": "string" },
{
"type": "array",
"description": "indexes of collection",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "index.json"
}
]
}
}
]
}
},
"required": ["name", "permissions"]
}