Sebastian Frank
7743cebae3
All checks were successful
continuous-integration/drone/push Build is passing
218 lines
9.2 KiB
JSON
218 lines
9.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,
|
|
"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,
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "field.json#/definitions/i18nString"
|
|
},
|
|
"muiIcon": {
|
|
"type": "string",
|
|
"description": "material ui icon name"
|
|
},
|
|
"rowIdentTpl": {
|
|
"description": "template which evaluates to short string to identify entry in pe. select boxes",
|
|
"$ref": "field.json#/definitions/evalExpressions"
|
|
},
|
|
"defaultSort": {
|
|
"type": "object",
|
|
"description": "default sort in admin ui lists",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"field": {
|
|
"$ref": "field.json#/definitions/fieldSource"
|
|
},
|
|
"order": {
|
|
"description": "sort order",
|
|
"enum": ["ASC", "DESC"]
|
|
}
|
|
}
|
|
},
|
|
"views": {
|
|
"type": "array",
|
|
"description": "list views",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"mediaQuery": {
|
|
"type": "string",
|
|
"description": "css media query to select this view in ui"
|
|
}
|
|
},
|
|
"oneOf": [
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"const": "simpleList"
|
|
},
|
|
"primaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "field.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "field.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
},
|
|
"secondaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "field.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "field.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
},
|
|
"tertiaryText": {
|
|
"oneOf": [
|
|
{
|
|
"$ref": "field.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"$ref": "field.json#/definitions/evalExpressions"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["type", "primaryText"]
|
|
},
|
|
{
|
|
"properties": {
|
|
"type": {
|
|
"const": "table"
|
|
},
|
|
"columns": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"$ref": "field.json#/definitions/fieldSource"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "field.json#/definitions/i18nString"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"allOf": [
|
|
{
|
|
"$ref": "field.json#/definitions/evalExpressions"
|
|
},
|
|
{
|
|
"properties": {
|
|
"label": {
|
|
"$ref": "field.json#/definitions/i18nString"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"minItems": 1
|
|
}
|
|
},
|
|
"required": ["type", "columns"]
|
|
}
|
|
],
|
|
"required": ["type"]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"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"]
|
|
}
|