{
  "$id": "https://weblate.org/schemas/weblate-cdn-manifest.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CDN manifest",
  "description": "Translation files published by the JavaScript and translation files CDN add-ons.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion",
    "locales"
  ],
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "locales": {
      "type": "object",
      "description": "Published files keyed by Weblate language code; an empty object is allowed. Files are sorted by URL.",
      "propertyNames": {
        "minLength": 1
      },
      "additionalProperties": {
        "type": "array",
        "minItems": 1,
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "url",
            "sha256",
            "size"
          ],
          "properties": {
            "url": {
              "type": "string",
              "minLength": 1,
              "description": "File URL relative to the manifest URL, including percent-encoded nested paths. Published files are mutable."
            },
            "sha256": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$(?![\\s\\S])",
              "description": "SHA-256 checksum of the published bytes."
            },
            "size": {
              "type": "integer",
              "minimum": 0,
              "description": "File size in bytes; empty files are allowed."
            }
          }
        }
      }
    }
  }
}
