feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
continuous-integration/drone/push Build is passing

- Introduced `field-list.schema.json`, `field-meta.schema.json`, and `field.schema.json` for field configurations.
- Added `hooks.schema.json` for defining hooks in the Tibi project.
- Created `image-filter.schema.json` for image processing configurations.
- Implemented `job.schema.json` for job scheduling configurations.
- Added `openapi.schema.json` for OpenAPI metadata generation.
- Introduced `permissions.schema.json` for managing permissions in the project.
- Created `project.schema.json` for overall project configuration.
- Added `projections.schema.json` for defining projections in the project.
- Implemented a validation script `validate-schemas.mjs` to ensure schema compliance.
This commit is contained in:
2026-07-01 09:21:26 +00:00
parent 4b588d1269
commit 0804c3c3c4
40 changed files with 3911 additions and 3231 deletions
+434
View File
@@ -0,0 +1,434 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "action.schema.json",
"title": "Tibi action config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string",
"pattern": "^[0-9A-Za-z_-]+$"
},
"meta": {
"$ref": "action.schema.json#/definitions/actionMeta"
},
"permissions": {
"$ref": "action.schema.json#/definitions/actionPermissions"
},
"hooks": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "hooks.schema.json"
}
]
}
},
"required": [
"name"
],
"definitions": {
"actionField": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string",
"pattern": "^[0-9A-Za-z_]+$"
},
"type": {
"type": "string",
"enum": [
"string",
"string[]",
"number",
"number[]",
"boolean",
"object",
"object[]",
"file",
"file[]",
"date",
"any"
]
},
"index": {
"type": "array",
"items": {
"type": "string",
"enum": [
"single",
"unique",
"text",
"sparse",
"background"
]
}
},
"subFields": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json#/definitions/actionField"
}
]
}
}
]
},
"validator": {
"$ref": "field.schema.json#/definitions/field/properties/validator"
},
"readonly": {
"$ref": "defs.schema.json#/definitions/boolOrEval"
},
"hidden": {
"$ref": "defs.schema.json#/definitions/boolOrEval"
},
"strictFields": {
"type": "boolean"
},
"meta": {
"$ref": "field-meta.schema.json"
}
},
"required": [
"name",
"type"
]
},
"actionMappedField": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"source": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"name": {
"type": "string",
"pattern": "^[0-9A-Za-z_]+$"
},
"type": {
"type": "string",
"enum": [
"string",
"string[]",
"number",
"number[]",
"boolean",
"object",
"object[]",
"file",
"file[]",
"date",
"any"
]
},
"subFields": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json#/definitions/actionMappedField"
}
]
}
}
]
},
"meta": {
"$ref": "field-meta.schema.json"
}
},
"required": [
"type"
],
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"name"
]
}
]
},
"actionFieldSection": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"title": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"description": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json#/definitions/actionField"
}
]
}
}
}
},
"actionExecutionMeta": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"kind": {
"type": "string"
},
"cancellable": {
"type": "boolean"
}
}
},
"actionOutputProgressMapping": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"indexField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"countField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"statusField": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
}
]
},
"messageField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json#/definitions/actionMappedField"
}
]
}
}
}
},
"actionOutputMappingSection": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"fields": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json#/definitions/actionMappedField"
}
]
}
}
}
},
"actionOutputMapping": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"summary": {
"$ref": "action.schema.json#/definitions/actionOutputMappingSection"
},
"details": {
"$ref": "action.schema.json#/definitions/actionOutputMappingSection"
},
"progress": {
"$ref": "action.schema.json#/definitions/actionOutputProgressMapping"
}
}
},
"actionOutputMeta": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"title": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"mapping": {
"$ref": "action.schema.json#/definitions/actionOutputMapping"
}
}
},
"actionMethodMeta": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"query": {
"$ref": "action.schema.json#/definitions/actionFieldSection"
},
"data": {
"$ref": "action.schema.json#/definitions/actionFieldSection"
},
"execution": {
"$ref": "action.schema.json#/definitions/actionExecutionMeta"
},
"output": {
"$ref": "action.schema.json#/definitions/actionOutputMeta"
}
}
},
"actionMeta": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"description": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"group": {
"type": "string"
},
"hide": {
"type": "boolean"
},
"methods": {
"type": "object",
"patternProperties": {
"^x-": {},
"^[a-zA-Z0-9_-]+$": {
"$ref": "action.schema.json#/definitions/actionMethodMeta"
}
},
"additionalProperties": false
}
}
},
"actionPermissionSet": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"methods": {
"type": "object",
"additionalProperties": false,
"properties": {
"get": {
"$ref": "defs.schema.json#/definitions/methodPermissionGet"
},
"post": {
"$ref": "defs.schema.json#/definitions/methodPermissionWrite"
}
}
}
},
"required": [
"methods"
]
},
"actionPermissions": {
"type": "object",
"additionalProperties": false,
"properties": {
"public": {
"$ref": "action.schema.json#/definitions/actionPermissionSet"
},
"user": {
"$ref": "action.schema.json#/definitions/actionPermissionSet"
}
},
"patternProperties": {
"^x-": {},
"^token:[^\\s]+$": {
"$ref": "action.schema.json#/definitions/actionPermissionSet"
},
"^[a-zA-Z0-9_]+$": {
"$ref": "action.schema.json#/definitions/actionPermissionSet"
}
},
"required": [
"public",
"user"
]
}
}
}
+22
View File
@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "asset.schema.json",
"title": "Tibi asset config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
}
},
"required": [
"name",
"path"
]
}
+380
View File
@@ -0,0 +1,380 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "collection-meta.schema.json",
"title": "Tibi collection meta config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"group": {
"type": "string"
},
"imageUrl": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"hide": {
"type": "boolean"
},
"singleton": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"key": {
"type": "string"
}
},
"required": [
"enabled"
]
},
"subNavigation": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"muiIcon": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
"required": [
"field"
]
},
"setDefault": {
"type": "object",
"additionalProperties": false,
"description": "Pre-fill a field with a default value when creating a new entry while this subNav tab is active.",
"properties": {
"field": {
"type": "string"
},
"value": {}
},
"required": [
"field",
"value"
]
}
},
"required": [
"name"
]
}
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"i18n": {
"oneOf": [
{
"type": "boolean",
"enum": [
false
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"defaultLanguage": {
"type": "string"
},
"languages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"code"
]
}
},
"entry": {
"type": "object",
"additionalProperties": false,
"properties": {
"languageField": {
"type": "string"
},
"groupField": {
"type": "string"
},
"clearFields": {
"type": "array",
"items": {
"type": "string"
}
},
"copyFields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"languageField",
"groupField"
]
}
}
}
]
},
"defaultSort": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/sortField"
},
"order": {
"type": "string",
"enum": [
"ASC",
"DESC",
"MANUALLY"
]
}
},
"required": [
"field"
]
},
"viewHint": {
"oneOf": [
{
"type": "string",
"enum": [
"table",
"cards"
]
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"media": {
"type": "object",
"additionalProperties": false,
"properties": {
"upload": {
"type": "object",
"additionalProperties": false,
"properties": {
"autoFill": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"ai": {
"type": "object",
"additionalProperties": false,
"properties": {
"targetField": {
"type": "string"
},
"prompt": {
"type": "string"
},
"image": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number",
"exclusiveMinimum": 0
},
"maxHeight": {
"type": "number",
"exclusiveMinimum": 0
},
"quality": {
"type": "number",
"exclusiveMinimum": 0,
"maximum": 1
}
}
}
}
}
}
},
"navigation": {
"type": "object",
"additionalProperties": false,
"properties": {
"nodesField": {
"type": "string"
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"declaredTrees": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"singleton": {
"type": "object",
"additionalProperties": true
},
"maxLevel": {
"type": "number"
}
},
"required": [
"singleton"
]
}
}
}
}
},
"oneOf": [
{
"required": [
"media"
]
},
{
"required": [
"navigation"
]
}
]
}
]
},
"pagebuilder": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultViewport": {
"$ref": "defs.schema.json#/definitions/pagebuilderViewport"
},
"blockTypeField": {
"type": "string"
},
"blockRegistry": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
},
"screenshot": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"field": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"fileField": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"screenWidth": {
"type": "integer",
"minimum": 1
},
"imageWidth": {
"type": "integer",
"minimum": 1
}
},
"required": [
"field",
"fileField"
]
}
}
}
},
"sidebar": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"group": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"group"
]
}
},
"openapi": {
"$ref": "openapi.schema.json"
}
}
}
+431
View File
@@ -0,0 +1,431 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "collection.schema.json",
"title": "Tibi collection config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string"
},
"defaultLanguage": {
"type": "string"
},
"uploadPath": {
"type": "string"
},
"upload": {
"$ref": "collection.schema.json#/definitions/uploadConfig"
},
"permissions": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "permissions.schema.json"
}
]
},
"projections": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "projections.schema.json"
}
]
},
"hooks": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "hooks.schema.json"
}
]
},
"meta": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "collection-meta.schema.json"
}
]
},
"imageFilter": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "image-filter.schema.json"
}
]
},
"fields": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "field-list.schema.json"
}
]
},
"indexes": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "collection.schema.json#/definitions/indexConfig"
}
]
}
}
]
},
"audit": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"actions": {
"type": "array",
"items": {
"type": "string",
"enum": [
"create",
"update",
"delete",
"bulkCreate",
"bulkUpdate",
"bulkDelete"
]
}
}
}
},
"bulk": {
"type": "object",
"additionalProperties": false,
"properties": {
"optimize": {
"type": "object",
"additionalProperties": false,
"properties": {
"create": {
"type": "boolean"
},
"update": {
"type": "boolean"
},
"delete": {
"type": "boolean"
}
}
}
}
},
"queryLimits": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultLimit": {
"type": "integer",
"minimum": 0
},
"maxLimit": {
"type": "integer",
"minimum": 0
}
}
},
"readonlyFields": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"hiddenFields": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"strictFields": {
"type": "boolean"
},
"search": {
"type": "array",
"items": {
"$ref": "collection.schema.json#/definitions/searchConfig"
}
}
},
"required": [
"name",
"permissions"
],
"definitions": {
"uploadConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxBodySize": {
"type": "string"
},
"allowedMimeTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"indexConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"unique": {
"type": "boolean"
},
"dropDups": {
"type": "boolean"
},
"background": {
"type": "boolean"
},
"sparse": {
"type": "boolean"
},
"defaultLanguage": {
"type": "string"
},
"languageOverride": {
"type": "string"
}
},
"required": [
"key"
]
},
"searchConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"text",
"regex",
"eval",
"filter",
"ngram",
"vector",
"combined"
]
},
"fields": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"meta": {
"type": "object",
"additionalProperties": true
},
"eval": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"ngram": {
"type": "object",
"additionalProperties": false,
"properties": {
"sizes": {
"type": "array",
"items": {
"type": "integer",
"minimum": 1
}
},
"normalize": {
"type": "object",
"additionalProperties": false,
"properties": {
"use": {
"type": "array",
"items": {
"type": "string"
}
},
"eval": {
"type": "string"
}
}
}
}
},
"regex": {
"type": "object",
"additionalProperties": false,
"properties": {
"weights": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"scoring": {
"type": "string",
"enum": [
"count",
"binary",
"log"
]
}
}
},
"score": {
"type": "object",
"additionalProperties": false,
"properties": {
"expr": {
"type": "object",
"additionalProperties": true
}
}
},
"vector": {
"type": "object",
"additionalProperties": false,
"properties": {
"provider": {
"type": "string"
},
"documentPrefix": {
"type": "string"
},
"queryPrefix": {
"type": "string"
},
"overflow": {
"type": "string",
"enum": [
"truncate",
"chunk"
]
},
"chunkSize": {
"type": "integer",
"minimum": 1
},
"chunkOverlap": {
"type": "integer",
"minimum": 0
}
},
"required": [
"provider"
]
},
"rrf": {
"type": "object",
"additionalProperties": false,
"properties": {
"k": {
"type": "integer",
"minimum": 1
},
"topK": {
"type": "integer",
"minimum": 1
},
"weights": {
"type": "object",
"additionalProperties": {
"type": "number"
}
},
"strategy": {
"type": "string",
"enum": ["rrf", "score_rrf", "score_sum", "rank_score", "hybrid"]
},
"normalize": {
"type": "string",
"enum": ["none", "minmax", "zscore"]
},
"scoreWeight": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"sourceConfig": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"scoreWeight": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"boost": {
"type": "number",
"minimum": 0
}
}
}
}
}
},
"async": {
"type": "boolean"
},
"autoRegenerate": {
"type": "boolean"
}
},
"required": [
"name",
"mode"
]
}
}
}
+508
View File
@@ -0,0 +1,508 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "defs.schema.json",
"title": "Shared definitions for Tibi config schemas",
"definitions": {
"i18nText": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"minProperties": 1,
"patternProperties": {
"^[a-z]{2}(-[A-Za-z0-9_]+)?$": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"fieldPath": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*$"
},
"evalString": {
"type": "object",
"additionalProperties": false,
"properties": {
"eval": {
"type": "string"
},
"select": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
}
},
"required": [
"eval"
]
},
"evalHtml": {
"type": "object",
"additionalProperties": false,
"properties": {
"eval": {
"type": "string"
},
"raw": {
"type": "boolean"
}
},
"required": [
"eval"
]
},
"boolOrEval": {
"oneOf": [
{
"type": "boolean"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"boolOrUiCondition": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"uiCondition": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"sortField": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"required": [
"source"
]
}
]
},
"pagebuilderViewport": {
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "string",
"enum": [
"desktop",
"tablet",
"phone"
]
}
]
},
"badgeVariant": {
"type": "string",
"enum": [
"success",
"error",
"warning",
"info",
"neutral"
]
},
"choiceItem": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"value": {
"type": [
"string",
"number",
"boolean",
"null"
]
},
"name": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"description": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"badgeVariant": {
"$ref": "defs.schema.json#/definitions/badgeVariant"
},
"chipVariant": {
"$ref": "defs.schema.json#/definitions/badgeVariant"
},
"badgeStyle": {
"type": "object",
"description": "Flat inline CSS properties for badge/chip rendering. Supports camelCase, kebab-case, and CSS custom properties. `bg`/`text` are aliases for `background`/`color`.",
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
},
"chipStyle": {
"type": "object",
"description": "Alias for badgeStyle with the same value shape.",
"additionalProperties": {
"type": [
"string",
"number",
"boolean"
]
}
}
},
"anyOf": [
{
"required": [
"id"
]
},
{
"required": [
"value"
]
}
],
"anyOfComment": "Choice labels are optional for now because some block-type helper lists are resolved elsewhere."
},
"choices": {
"oneOf": [
{
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/choiceItem"
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"endpoint": {
"type": "string"
},
"mapping": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"params": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"endpoint"
]
}
]
},
"previewTableColumn": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"source": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"align": {
"type": "string",
"enum": [
"left",
"center",
"right"
]
},
"eval": {
"type": "string"
},
"raw": {
"type": "boolean"
},
"select": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
}
},
"anyOf": [
{
"required": [
"source"
]
},
{
"required": [
"eval"
]
}
]
}
]
},
"previewSlots": {
"type": "object",
"additionalProperties": false,
"properties": {
"label": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"labelStyle": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"secondary": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"tertiary": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"badge": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"image": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"imageFallback": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"mediaFile": {
"$ref": "defs.schema.json#/definitions/fieldPath"
},
"eval": {
"type": "string"
},
"raw": {
"type": "boolean"
},
"select": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"table": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/previewTableColumn"
}
}
},
"anyOf": [
{
"required": [
"label"
]
},
{
"required": [
"secondary"
]
},
{
"required": [
"tertiary"
]
},
{
"required": [
"badge"
]
},
{
"required": [
"image"
]
},
{
"required": [
"table"
]
}
]
},
"previewConfig": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalHtml"
},
{
"$ref": "defs.schema.json#/definitions/previewSlots"
}
]
},
"foreignRender": {
"oneOf": [
{
"$ref": "defs.schema.json#/definitions/fieldPath"
},
{
"$ref": "defs.schema.json#/definitions/evalHtml"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"defaultCollectionViews": {
"type": "boolean"
}
},
"required": [
"defaultCollectionViews"
]
},
{
"$ref": "defs.schema.json#/definitions/previewSlots"
}
]
},
"methodPermissionGet": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"allow": {
"type": "boolean"
}
},
"required": [
"allow"
]
}
]
},
"methodPermissionWrite": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"allow": {
"type": "boolean"
},
"bulk": {
"type": "boolean"
}
},
"required": [
"allow"
]
}
]
}
}
}
+16
View File
@@ -0,0 +1,16 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "field-list.schema.json",
"title": "Tibi field list config",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "field.schema.json"
}
]
}
}
+305
View File
@@ -0,0 +1,305 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "field-meta.schema.json",
"title": "Tibi field meta config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"widget": {
"type": "string",
"enum": [
"text",
"textarea",
"checkbox",
"switch",
"select",
"selectArray",
"chipArray",
"date",
"datetime",
"file",
"image",
"json",
"richtext",
"html",
"foreignKey",
"foreignKeyChipArray",
"foreignFile",
"foreignMedia",
"pagebuilder",
"pageBuilder",
"containerLessObject",
"containerLessObjectArray",
"color"
]
},
"i18n": {
"const": false
},
"helperText": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"hideLabel": {
"type": "boolean"
},
"hide": {
"type": "boolean"
},
"protected": {
"$ref": "defs.schema.json#/definitions/boolOrUiCondition"
},
"position": {
"type": "string",
"pattern": "^(main|sidebar|sidebar:.+)$"
},
"section": {
"type": "string"
},
"containerProps": {
"type": "object",
"additionalProperties": false,
"properties": {
"class": {
"type": "string"
},
"layout": {
"type": "object",
"additionalProperties": false,
"properties": {
"breakBefore": {
"type": "boolean"
},
"breakAfter": {
"type": "boolean"
},
"size": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"default": {
"type": "string"
},
"small": {
"type": "string"
},
"large": {
"type": "string"
}
}
}
]
}
}
}
}
},
"defaultValue": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array"
},
{
"type": "object"
}
]
},
"dependsOn": {
"$ref": "defs.schema.json#/definitions/uiCondition"
},
"inputProps": {
"type": "object",
"additionalProperties": true
},
"choices": {
"$ref": "defs.schema.json#/definitions/choices"
},
"foreign": {
"type": "object",
"additionalProperties": false,
"properties": {
"collection": {
"type": "string"
},
"id": {
"type": "string"
},
"sort": {
"type": "string"
},
"projection": {
"type": "string"
},
"filter": {
"type": "object",
"additionalProperties": true
},
"createDefaults": {
"type": "object",
"additionalProperties": true
},
"subNavigation": {
"type": "integer",
"minimum": 0
},
"render": {
"$ref": "defs.schema.json#/definitions/foreignRender"
},
"autoFill": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"collection"
]
},
"downscale": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxWidth": {
"type": "number"
},
"maxHeight": {
"type": "number"
},
"quality": {
"type": "number"
}
}
},
"imageEditor": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"crop": {
"type": "boolean"
},
"rotate": {
"type": "boolean"
},
"flip": {
"type": "boolean"
},
"focalPoint": {
"type": "boolean"
},
"adjust": {
"type": "boolean"
},
"palette": {
"type": "boolean"
}
}
}
]
},
"drillDown": {
"type": "boolean"
},
"pageSize": {
"type": "integer",
"minimum": 0
},
"preview": {
"$ref": "defs.schema.json#/definitions/previewConfig"
},
"addElementLabel": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"filter": {
"oneOf": [
{
"type": "boolean",
"description": "Set to true to opt-in this field as a filterable field in the admin UI, or false to explicitly exclude it."
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"enum": [
"default",
"select",
"bool",
"boolean",
"input",
"number",
"foreignKey"
]
},
"facets": {
"type": "boolean"
}
}
}
]
},
"pagebuilder": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultViewport": {
"$ref": "defs.schema.json#/definitions/pagebuilderViewport"
},
"blockTypeField": {
"type": "string"
},
"mode": {
"type": "string",
"enum": [
"overlay",
"inline",
"both"
]
},
"blockRegistry": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
]
}
}
},
"openapi": {
"$ref": "openapi.schema.json#/definitions/fieldOpenapi"
}
}
}
+171
View File
@@ -0,0 +1,171 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "field.schema.json",
"title": "Tibi field config",
"$ref": "#/definitions/field",
"definitions": {
"field": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string",
"pattern": "^[0-9A-Za-z_]+$"
},
"type": {
"type": "string",
"enum": [
"string",
"string[]",
"number",
"number[]",
"boolean",
"object",
"object[]",
"file",
"file[]",
"date",
"any"
]
},
"index": {
"type": "array",
"items": {
"type": "string",
"enum": [
"single",
"unique",
"text",
"sparse",
"background"
]
}
},
"subFields": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/field"
}
]
}
}
]
},
"validator": {
"type": "object",
"additionalProperties": false,
"properties": {
"required": {
"type": "boolean"
},
"allowZero": {
"type": "boolean"
},
"format": {
"type": "string",
"enum": ["email", "url", "uuid", "slug"]
},
"eval": {
"type": "string"
},
"minItems": {
"type": "number"
},
"maxItems": {
"type": "number"
},
"minLength": {
"type": "number"
},
"maxLength": {
"type": "number"
},
"pattern": {
"type": "string"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
},
"minDate": {
"type": "string"
},
"maxDate": {
"type": "string"
},
"minFileSize": {
"type": "string"
},
"in": {
"type": "array"
},
"maxFileSize": {
"type": "string"
},
"accept": {
"type": "array",
"items": {
"type": "string"
}
},
"image": {
"type": "object",
"additionalProperties": false,
"properties": {
"minWidth": {
"type": "number"
},
"maxWidth": {
"type": "number"
},
"minHeight": {
"type": "number"
},
"maxHeight": {
"type": "number"
},
"allowNonImages": {
"type": "boolean"
},
"allowUnknownDimensions": {
"type": "boolean"
}
}
}
}
},
"readonly": {
"$ref": "defs.schema.json#/definitions/boolOrEval"
},
"hidden": {
"$ref": "defs.schema.json#/definitions/boolOrEval"
},
"strictFields": {
"type": "boolean"
},
"meta": {
"$ref": "field-meta.schema.json"
}
},
"required": [
"name",
"type"
]
}
}
}
+145
View File
@@ -0,0 +1,145 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "hooks.schema.json",
"title": "Tibi hooks config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"get": {
"$ref": "hooks.schema.json#/definitions/getHooks"
},
"post": {
"$ref": "hooks.schema.json#/definitions/postHooks"
},
"put": {
"$ref": "hooks.schema.json#/definitions/putHooks"
},
"delete": {
"$ref": "hooks.schema.json#/definitions/deleteHooks"
},
"audit": {
"$ref": "hooks.schema.json#/definitions/auditHooks"
}
},
"definitions": {
"hook": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"const": "javascript"
},
"file": {
"type": "string"
},
"timeout": {
"type": "integer",
"minimum": 0
}
},
"required": [
"type",
"file"
]
},
"getHooks": {
"type": "object",
"additionalProperties": false,
"properties": {
"handle": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"read": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"return": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"file": {
"$ref": "hooks.schema.json#/definitions/hook"
}
}
},
"postHooks": {
"type": "object",
"additionalProperties": false,
"properties": {
"bind": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"validate": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"handle": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"create": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"return": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkCreate": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkReturn": {
"$ref": "hooks.schema.json#/definitions/hook"
}
}
},
"putHooks": {
"type": "object",
"additionalProperties": false,
"properties": {
"bind": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"validate": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"update": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"return": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkUpdate": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkReturn": {
"$ref": "hooks.schema.json#/definitions/hook"
}
}
},
"deleteHooks": {
"type": "object",
"additionalProperties": false,
"properties": {
"delete": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"return": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkDelete": {
"$ref": "hooks.schema.json#/definitions/hook"
},
"bulkReturn": {
"$ref": "hooks.schema.json#/definitions/hook"
}
}
},
"auditHooks": {
"type": "object",
"additionalProperties": false,
"properties": {
"return": {
"$ref": "hooks.schema.json#/definitions/hook"
}
}
}
}
}
+110
View File
@@ -0,0 +1,110 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "image-filter.schema.json",
"title": "Tibi image filter config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {},
"^[a-zA-Z0-9_-]+$": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"fit": {
"type": "boolean"
},
"fill": {
"type": "boolean"
},
"resampling": {
"type": "string",
"enum": [
"nearestNeighbor",
"hermite",
"linear",
"catmullRom",
"lanczos",
"box",
"mitchellNetravili",
"bSpline",
"gaussian",
"bartlett",
"hann",
"hamming",
"blackman",
"welch",
"cosine"
]
},
"anchor": {
"type": "string",
"enum": [
"center",
"topLeft",
"top",
"topRight",
"left",
"right",
"bottomLeft",
"bottom",
"bottomRight"
]
},
"brightness": {
"type": "number"
},
"saturation": {
"type": "number"
},
"contrast": {
"type": "number"
},
"gamma": {
"type": "number"
},
"blur": {
"type": "number"
},
"sharpen": {
"type": "number"
},
"invert": {
"type": "boolean"
},
"grayscale": {
"type": "boolean"
},
"quality": {
"type": "number"
},
"lossless": {
"type": "boolean"
},
"skipLargerDimension": {
"type": "boolean"
},
"skipLargerFilesize": {
"type": "boolean"
},
"outputType": {
"type": "string",
"enum": [
"jpg",
"jpeg",
"png",
"webp"
]
}
}
}
}
}
}
+33
View File
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "job.schema.json",
"title": "Tibi job config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"cron": {
"type": "string"
},
"type": {
"const": "javascript"
},
"file": {
"type": "string"
},
"timeout": {
"type": "integer",
"minimum": 0
},
"meta": {
"type": "object",
"additionalProperties": true
}
},
"required": [
"type",
"file"
]
}
+187
View File
@@ -0,0 +1,187 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "openapi.schema.json",
"title": "Tibi OpenAPI collection config",
"description": "OpenAPI metadata for a collection, used to generate the project's OpenAPI 3.0 spec via /_openapi/:project",
"type": "object",
"additionalProperties": true,
"definitions": {
"i18nOrString": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"minProperties": 1,
"patternProperties": {
"^[a-z]{2}(-[A-Za-z0-9_]+)?$": {
"type": "string"
}
},
"additionalProperties": false
}
]
},
"codeSample": {
"type": "object",
"additionalProperties": true,
"properties": {
"lang": {
"type": "string",
"description": "Language identifier (e.g. Shell, JavaScript, Python)"
},
"label": {
"type": "string",
"description": "Display label for the code sample"
},
"source": {
"type": "string",
"description": "The code sample source"
}
},
"required": ["lang", "source"]
},
"responseObject": {
"type": "object",
"additionalProperties": true,
"properties": {
"description": {
"$ref": "#/definitions/i18nOrString"
},
"x-summary": {
"type": "string"
}
}
},
"operationObject": {
"type": "object",
"additionalProperties": true,
"properties": {
"disabled": {
"type": "boolean",
"description": "Exclude this operation from the generated OpenAPI spec"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "OpenAPI tags for grouping"
},
"summary": {
"$ref": "#/definitions/i18nOrString"
},
"description": {
"$ref": "#/definitions/i18nOrString"
},
"x-codeSamples": {
"type": "array",
"items": {
"$ref": "#/definitions/codeSample"
}
},
"parameters": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"properties": {
"name": {
"type": "string"
},
"in": {
"type": "string",
"enum": ["query", "header", "path", "cookie"]
},
"description": {
"$ref": "#/definitions/i18nOrString"
},
"required": {
"type": "boolean"
},
"schema": {
"type": "object",
"additionalProperties": true
}
},
"required": ["name", "in"]
}
},
"responses": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/responseObject"
},
"propertyNames": {
"pattern": "^[1-5][0-9]{2}$|^default$"
}
},
"security": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"fieldOpenapi": {
"type": "object",
"description": "OpenAPI metadata for a collection field. Extra properties are merged into the field's schema object.",
"additionalProperties": true,
"properties": {
"disabled": {
"type": "boolean",
"description": "Exclude this field from the generated OpenAPI schema"
},
"description": {
"$ref": "#/definitions/i18nOrString"
},
"example": {},
"format": {
"type": "string",
"description": "OpenAPI format hint (e.g. date-time, email, uri)"
},
"enum": {
"type": "array",
"description": "Restrict values to a fixed set"
},
"deprecated": {
"type": "boolean"
}
}
}
},
"properties": {
"disabled": {
"type": "boolean",
"description": "Exclude this entire collection from the generated OpenAPI spec"
},
"get": {
"$ref": "#/definitions/operationObject",
"description": "OpenAPI operation overrides for the list endpoint (GET /{collection})"
},
"getOne": {
"$ref": "#/definitions/operationObject",
"description": "OpenAPI operation overrides for the single-entry endpoint (GET /{collection}/{id})"
},
"post": {
"$ref": "#/definitions/operationObject",
"description": "OpenAPI operation overrides for the create endpoint (POST /{collection})"
},
"put": {
"$ref": "#/definitions/operationObject",
"description": "OpenAPI operation overrides for the update endpoint (PUT /{collection}/{id})"
},
"delete": {
"$ref": "#/definitions/operationObject",
"description": "OpenAPI operation overrides for the delete endpoint (DELETE /{collection}/{id})"
}
}
}
+79
View File
@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "permissions.schema.json",
"title": "Tibi permissions config",
"type": "object",
"additionalProperties": false,
"properties": {
"public": {
"$ref": "permissions.schema.json#/definitions/permissionSet"
},
"user": {
"$ref": "permissions.schema.json#/definitions/permissionSet"
}
},
"patternProperties": {
"^x-": {},
"^token:[^\\s]+$": {
"$ref": "permissions.schema.json#/definitions/permissionSet"
},
"^[a-zA-Z0-9_]+$": {
"$ref": "permissions.schema.json#/definitions/permissionSet"
}
},
"required": [
"public",
"user"
],
"definitions": {
"permissionSet": {
"type": "object",
"additionalProperties": false,
"properties": {
"methods": {
"type": "object",
"additionalProperties": false,
"properties": {
"get": {
"$ref": "defs.schema.json#/definitions/methodPermissionGet"
},
"post": {
"$ref": "defs.schema.json#/definitions/methodPermissionWrite"
},
"put": {
"$ref": "defs.schema.json#/definitions/methodPermissionWrite"
},
"delete": {
"$ref": "defs.schema.json#/definitions/methodPermissionWrite"
}
}
},
"filter": {
"type": "object",
"additionalProperties": true
},
"validProjections": {
"type": "array",
"items": {
"type": "string"
}
},
"readonlyFields": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
},
"hiddenFields": {
"type": "array",
"items": {
"$ref": "defs.schema.json#/definitions/fieldPath"
}
}
},
"required": [
"methods"
]
}
}
}
+297
View File
@@ -0,0 +1,297 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "project.schema.json",
"title": "Tibi project config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"namespace": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]+$"
},
"meta": {
"type": "object",
"additionalProperties": false,
"properties": {
"imageUrl": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "defs.schema.json#/definitions/evalString"
}
]
},
"permissions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"name"
]
}
},
"collectionGroups": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
},
"icon": {
"type": "string"
}
},
"required": [
"name"
]
}
},
"i18n": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultLanguage": {
"type": "string"
},
"languages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"label": {
"$ref": "defs.schema.json#/definitions/i18nText"
}
},
"required": [
"code"
]
}
}
},
"required": [
"defaultLanguage",
"languages"
]
}
}
},
"upload": {
"$ref": "project.schema.json#/definitions/uploadConfig"
},
"collections": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "collection.schema.json"
}
]
}
},
"jobs": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "job.schema.json"
}
]
}
},
"actions": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "action.schema.json"
}
]
}
},
"assets": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "asset.schema.json"
}
]
}
},
"cors": {
"type": "object",
"additionalProperties": false,
"properties": {
"merge": {
"type": "boolean"
},
"allowOrigins": {
"type": "array",
"items": {
"type": "string"
}
},
"allowCredentials": {
"type": "boolean"
},
"allowHeaders": {
"type": "array",
"items": {
"type": "string"
}
},
"allowMethods": {
"type": "array",
"items": {
"type": "string"
}
},
"exposeHeaders": {
"type": "array",
"items": {
"type": "string"
}
},
"maxAge": {
"type": "integer",
"minimum": 0
}
}
},
"admin": {
"type": "object",
"additionalProperties": false,
"properties": {
"tokens": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"token": {
"type": "string"
},
"allowReload": {
"type": "boolean"
},
"allowRegenerateSearch": {
"type": "boolean"
}
},
"required": [
"token"
]
}
}
}
},
"hook": {
"type": "object",
"additionalProperties": false,
"properties": {
"cache": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxEntries": {
"type": "integer",
"minimum": 0
},
"defaultTTL": {
"type": "string"
}
}
},
"ratelimit": {
"type": "object",
"additionalProperties": false,
"properties": {
"backoffInitialDelay": {
"type": "string"
},
"backoffMaxDelay": {
"type": "string"
},
"backoffResetAfter": {
"type": "string"
},
"windowSize": {
"type": "string"
},
"windowMaxHits": {
"type": "integer",
"minimum": 0
}
}
}
}
},
"strictFields": {
"type": "boolean"
},
"legacy": {
"type": "object",
"additionalProperties": false,
"properties": {
"httpCodes": {
"type": "boolean"
}
}
}
},
"required": [
"namespace"
],
"definitions": {
"uploadConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxBodySize": {
"type": "string"
},
"allowedMimeTypes": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
+32
View File
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "projections.schema.json",
"title": "Tibi projections config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {},
"^[a-zA-Z0-9_]+$": {
"type": "object",
"additionalProperties": false,
"properties": {
"select": {
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "integer",
"enum": [
0,
1
]
}
}
},
"required": [
"select"
]
}
}
}