Files
tibi-types/demo-api/collections/mycol.yml
T
apairon 913d5f4cb6 Schema: Bildoperationen (removeBackground/dropShadow/flatten) und Asset-Bildmodus
- image-filter.schema.json: removeBackground (color/tolerance/fromEdges/edgeBlur/
  referenceWidth), dropShadow (color/opacity/blur/offsets/padding/referenceWidth/
  canvas/background), flatten; Tippfehler mitchellNetravili -> mitchellNetravali
- asset.schema.json: optionaler imageProcessing-Block (access/cachePath/
  allowOriginal/defaultFilter/allowedInputTypes/limits/imageFilter)
- index.d.ts: passende Interfaces inkl. AssetConfig
- Beispiel: examples/server/asset-image-processing.yml, demo-api imageFilter.shadow
- validate-schemas.mjs: examples/server-Pattern je Schema
2026-10-27 18:04:55 +00:00

153 lines
3.0 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"]
imageFilter:
shadow:
- width: 800
outputType: png
removeBackground:
color: "#FFFFFF"
tolerance: 8
fromEdges: true
edgeBlur: 1.5
referenceWidth: 1000
dropShadow:
color: "#000000"
opacity: 0.25
blur: 15
offsetX: 8
offsetY: 8
padding: 20
referenceWidth: 1000
canvas: expand
background: transparent
flatten: "#FFFFFF"