{
  "type": "object",
  "properties": {
    "schema_version": {
      "const": "0.2"
    },
    "theme_id": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]*$"
    },
    "device": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]*$"
    },
    "width": {
      "type": "integer",
      "minimum": 1
    },
    "height": {
      "type": "integer",
      "minimum": 1
    },
    "layers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]*$"
          },
          "asset": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]*$"
          },
          "order": {
            "type": "integer",
            "minimum": 0
          },
          "opacity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "file": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "asset",
          "order",
          "opacity",
          "file"
        ],
        "additionalProperties": true
      }
    }
  },
  "required": [
    "schema_version",
    "theme_id",
    "device",
    "width",
    "height",
    "layers"
  ],
  "additionalProperties": true,
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:imperial-school:dynamic-wallpaper-recipe:0.2"
}
