Files
tibi-types/schemas/config/asset.schema.json
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

85 lines
1.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "asset.schema.json",
"title": "Tibi asset config",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-": {}
},
"properties": {
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"imageProcessing": {
"type": "object",
"additionalProperties": false,
"properties": {
"access": {
"type": "string",
"enum": [
"public"
]
},
"cachePath": {
"type": "string"
},
"allowOriginal": {
"type": "boolean"
},
"defaultFilter": {
"type": "string"
},
"allowedInputTypes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"image/jpeg",
"image/png",
"image/webp"
]
}
},
"limits": {
"type": "object",
"additionalProperties": false,
"properties": {
"maxInputBytes": {
"type": "integer",
"minimum": 1,
"maximum": 67108864
},
"maxPixels": {
"type": "integer",
"minimum": 1,
"maximum": 40000000
}
}
},
"imageFilter": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "image-filter.schema.json"
}
]
}
},
"required": [
"access",
"cachePath",
"imageFilter"
]
}
},
"required": [
"name",
"path"
]
}