40b441df04
- 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.
79 lines
2.0 KiB
JSON
79 lines
2.0 KiB
JSON
{
|
|
"$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"
|
|
]
|
|
}
|
|
}
|
|
} |