{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sofinder.sohophp.app/schema/picker-entry.schema.json",
  "title": "SoFinder picker entry",
  "type": "object",
  "additionalProperties": false,
  "required": ["resource", "path", "name", "directory", "size", "modifiedAt", "mimeType", "url", "width", "height", "capabilities"],
  "properties": {
    "resource": {"type": "string", "minLength": 1},
    "path": {"type": "string"},
    "name": {"type": "string", "minLength": 1},
    "directory": {"const": false},
    "size": {"type": "integer", "minimum": 0},
    "modifiedAt": {"type": "integer", "minimum": 0},
    "mimeType": {"type": ["string", "null"]},
    "url": {"type": "string", "minLength": 1},
    "width": {"type": ["integer", "null"], "minimum": 1},
    "height": {"type": ["integer", "null"], "minimum": 1},
    "schemaVersion": {"const": "1.0"},
    "assetId": {"type": ["string", "null"], "pattern": "^[a-f0-9-]{36}$"},
    "version": {"type": "string"},
    "downloadUrl": {"type": ["string", "null"]},
    "alt": {"type": ["string", "null"]},
    "altTranslations": {"type": "object", "maxProperties": 20, "propertyNames": {"pattern": "^[a-z]{2,3}(?:-[a-z0-9]{2,8})*$"}, "additionalProperties": {"type": "string", "maxLength": 1000}},
    "variants": {"type": "array", "maxItems": 20, "items": {"type": "object", "additionalProperties": false, "required": ["width", "height", "url", "mimeType"], "properties": {"width": {"type": "integer", "minimum": 1}, "height": {"type": "integer", "minimum": 1}, "url": {"type": "string"}, "mimeType": {"type": "string"}}}},
    "capabilities": {"type": "object", "additionalProperties": {"type": "boolean"}}
  }
}
