media-library/.gitapp/schemas/media.json

78 lines
1.5 KiB
JSON

{
"$id": "media",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": [
"title"
],
"properties": {
"title": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"file": {
"type": "object",
"description": "File metadata (path, filename, mimeType, size)",
"x-file": {
"maxSize": 10485760,
"mimeTypes": [
"image/jpeg",
"image/png",
"image/webp",
"image/gif"
]
}
},
"width": {
"type": "integer",
"minimum": 1,
"description": "Image width in pixels"
},
"height": {
"type": "integer",
"minimum": 1,
"description": "Image height in pixels"
},
"format": {
"type": "string",
"description": "Image format (jpeg, png, webp, gif)"
},
"fileSize": {
"type": "integer",
"minimum": 0,
"description": "File size in bytes"
},
"folder": {
"type": "string",
"x-relation": {
"collection": "folders",
"type": "single"
}
},
"albums": {
"type": "array",
"items": {
"type": "string"
},
"x-relation": {
"collection": "albums",
"type": "multiple",
"maxItems": 10
}
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"x-relation": {
"collection": "tags",
"type": "multiple",
"maxItems": 20
}
}
}
}