feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions

- 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 40b441df04
41 changed files with 4038 additions and 3231 deletions
+85 -7
View File
@@ -3,11 +3,7 @@ uploadPath: ../media/mycol
meta:
label: { de: mycol, en: mycol }
rowIdentTpl: { twig: "{{ title }}" }
views:
- type: table
columns:
- title
preview: testfield
permissions: !include global/test-permissions.yml
@@ -39,8 +35,7 @@ fields:
label:
de: test2
en: test2
widget: "contentbuilder"
baseHref: /mycol
widget: "textarea"
- name: testfield3
type: string
@@ -50,3 +45,86 @@ fields:
en: test3
widget: "select"
choices: []
- name: code
type: string
validator:
pattern: "[A-Z]{3}-[0-9]{2}"
meta:
label:
de: Code
en: Code
widget: "text"
- name: status
type: string
validator:
in: [draft, published]
meta:
label:
de: Status
en: Status
widget: "text"
- name: contactEmail
type: string
validator:
format: email
meta:
label:
de: E-Mail
en: Email
widget: "text"
- name: shortCode
type: string
validator:
minLength: 3
maxLength: 5
meta:
label:
de: Kurzcode
en: Short code
widget: "text"
- name: rating
type: number
validator:
min: 1
max: 10
meta:
label:
de: Bewertung
en: Rating
widget: "text"
- name: eventDate
type: date
validator:
minDate: "2024-01-01"
maxDate: "2026-12-31"
meta:
label:
de: Eventdatum
en: Event date
widget: "date"
- name: heroImage
type: file
validator:
minFileSize: "10KB"
maxFileSize: "2MB"
accept: ["image/jpeg", "image/png", "image/webp"]
image:
minWidth: 1200
maxWidth: 3200
minHeight: 600
maxHeight: 2400
- name: attachments
type: file[]
validator:
minItems: 1
maxItems: 3
maxFileSize: "5MB"
accept: ["application/pdf"]