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.
131 lines
2.5 KiB
YAML
131 lines
2.5 KiB
YAML
name: mycol
|
|
uploadPath: ../media/mycol
|
|
|
|
meta:
|
|
label: { de: mycol, en: mycol }
|
|
preview: testfield
|
|
|
|
permissions: !include global/test-permissions.yml
|
|
|
|
projections:
|
|
test:
|
|
select:
|
|
field1: 1
|
|
|
|
hooks:
|
|
get:
|
|
return:
|
|
type: javascript
|
|
file: hooks/mycol/get_return.js
|
|
|
|
x-additional: test
|
|
|
|
fields:
|
|
- name: testfield
|
|
type: string
|
|
meta:
|
|
label:
|
|
de: test
|
|
en: test
|
|
widget: "text"
|
|
|
|
- name: testfield2
|
|
type: string
|
|
meta:
|
|
label:
|
|
de: test2
|
|
en: test2
|
|
widget: "textarea"
|
|
|
|
- name: testfield3
|
|
type: string
|
|
meta:
|
|
label:
|
|
de: test3
|
|
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"]
|