Files
tibi-types/schemas/api-config/config.json
Sebastian Frank 025a7ccca4
All checks were successful
continuous-integration/drone/push Build is passing
feat(schema): enhance API configuration schemas with new properties and validations
- Updated collection.json to include upload defaults, audit logging, query limits, and more.
- Enhanced collectionNavigation.json with viewHint configurations.
- Added project-wide upload defaults and hook configurations in config.json.
- Expanded field.json to support new field types, validations, and properties.
- Improved fieldMeta.json with additional widget configurations and properties.
- Updated hooks.json to include new bulk operation hooks and audit logging.
- Enhanced imageFilter.json with additional image processing options.
- Added timeout properties to job.json for better execution control.
- Refined permissions.json to allow more granular control over HTTP method permissions and added filter and field visibility options.
2026-03-30 12:28:50 +00:00

229 lines
8.0 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema tibi-server config file",
"description": "tibi-server config.yml linter",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x\\-": {
"description": "template property"
}
},
"properties": {
"namespace": {
"type": "string",
"description": "suffix for mongo db database and part of api url, can be overwritten in database project settings"
},
"meta": {
"type": "object",
"description": "meta object used for admin ui configuration",
"additionalProperties": true,
"properties": {
"dashboard": {
"$ref": "dashboard.json#/properties/dashboard"
},
"imageUrl": {
"description": "project's teaser image url shown in admin ui",
"oneOf": [
{
"type": "string"
},
{
"$ref": "definitions.json#/definitions/evalObject"
}
]
}
}
},
"upload": {
"type": "object",
"description": "project-wide upload defaults and restrictions",
"additionalProperties": false,
"properties": {
"maxBodySize": {
"type": "string",
"description": "default request body size limit for collections in this project (e.g. '50MB')"
},
"allowedMimeTypes": {
"type": "array",
"description": "project-wide allowed MIME types for file uploads; empty means all types are allowed",
"items": {
"type": "string"
}
}
}
},
"collections": {
"type": "array",
"description": "list of collections in this project",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "collection.json"
}
]
}
},
"jobs": {
"type": "array",
"description": "list of jobs in this project",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "job.json"
}
]
}
},
"assets": {
"type": "array",
"description": "list of assets in this project",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "assets.json"
}
]
}
},
"cors": {
"type": "object",
"description": "cors configuration",
"additionalProperties": false,
"properties": {
"merge": {
"type": "boolean",
"description": "merge with global cors configuration"
},
"allowOrigins": {
"type": "array",
"description": "list of allowed origins",
"items": {
"type": "string"
}
},
"allowMethods": {
"type": "array",
"description": "list of allowed methods",
"items": {
"type": "string"
}
},
"allowHeaders": {
"type": "array",
"description": "list of allowed headers",
"items": {
"type": "string"
}
},
"allowCredentials": {
"type": "boolean",
"description": "allow credentials"
},
"exposeHeaders": {
"type": "array",
"description": "list of exposed headers",
"items": {
"type": "string"
}
},
"maxAge": {
"type": "integer",
"description": "max age in seconds"
}
}
},
"admin": {
"type": "object",
"description": "admin configuration",
"additionalProperties": false,
"properties": {
"tokens": {
"type": "array",
"description": "list of admin tokens",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string",
"description": "admin token"
},
"allowReload": {
"type": "boolean",
"description": "allow reload"
}
}
}
}
}
},
"hook": {
"type": "object",
"description": "project-level hook configuration (cache and ratelimit)",
"additionalProperties": false,
"properties": {
"cache": {
"type": "object",
"description": "hook cache configuration",
"additionalProperties": false,
"properties": {
"maxEntries": {
"type": "integer",
"description": "maximum number of cache entries"
},
"defaultTTL": {
"type": "string",
"description": "default time-to-live (e.g. '5m', '1h')"
}
}
},
"ratelimit": {
"type": "object",
"description": "hook ratelimit configuration",
"additionalProperties": false,
"properties": {
"backoffInitialDelay": {
"type": "string",
"description": "initial backoff delay (e.g. '1s')"
},
"backoffMaxDelay": {
"type": "string",
"description": "maximum backoff delay (e.g. '5m')"
},
"backoffResetAfter": {
"type": "string",
"description": "reset backoff after this duration of no failures (e.g. '15m')"
},
"windowSize": {
"type": "string",
"description": "sliding window size (e.g. '1m')"
},
"windowMaxHits": {
"type": "integer",
"description": "maximum hits allowed per window"
}
}
}
}
},
"strictFields": {
"type": "boolean",
"description": "reject unknown fields not defined in the fields array (project-wide default)"
}
},
"required": [
"namespace"
]
}