Sebastian Frank
e4774d6042
All checks were successful
continuous-integration/drone/push Build is passing
189 lines
8.2 KiB
JSON
189 lines
8.2 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "JSON Schema WMBasic collection configuration",
|
|
"description": "WMBasic collection linter",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "collection name, part of api path"
|
|
},
|
|
"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": {
|
|
"type": "array",
|
|
"description": "fields of collection",
|
|
"items": {
|
|
"oneOf": [
|
|
{
|
|
"$comment": "for include tag",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"$ref": "field.json"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"required": ["name", "permissions"]
|
|
}
|