✨ feat: add new JSON schemas for Tibi configuration including fields, hooks, jobs, and permissions
continuous-integration/drone/push Build is passing
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:
@@ -1,4 +1,4 @@
|
||||
# yaml-language-server: $schema=../../../schemas/api-config/permissions.json
|
||||
# yaml-language-server: $schema=../../../schemas/config/permissions.schema.json
|
||||
|
||||
public:
|
||||
methods:
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user