{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://standards.msadsnetwork.com/downloads/schemas/lap-imp.schema.json",
  "title": "Lite Ad Profile v0.1 — imp.ext.lite",
  "type": "object",
  "required": [
    "ver",
    "level",
    "autoplay",
    "data_saver"
  ],
  "additionalProperties": false,
  "properties": {
    "ver": {
      "const": "0.1"
    },
    "level": {
      "enum": [
        1,
        2,
        3
      ]
    },
    "max_initial_kb": {
      "type": "integer",
      "minimum": 1
    },
    "max_total_kb": {
      "type": "integer",
      "minimum": 1
    },
    "autoplay": {
      "const": false
    },
    "data_saver": {
      "type": "boolean"
    },
    "max_requests": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "formats": {
      "type": "array",
      "items": {
        "enum": [
          "image",
          "text",
          "native",
          "html5",
          "video"
        ]
      },
      "uniqueItems": true
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "level": {
            "const": 1
          }
        }
      },
      "then": {
        "properties": {
          "formats": {
            "not": {
              "contains": {
                "const": "video"
              }
            }
          },
          "max_initial_kb": {
            "maximum": 30
          }
        }
      }
    }
  ]
}