{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/epr-manifest-json/latest.json",
  "title": "JSON schema for Entry Point Regulation manifest files",
  "x-lintel": {
    "source": "https://www.schemastore.org/epr-manifest.json",
    "sourceSha256": "02f0820aa6215f38aa562034783e2382079b53c0468cd4b8525df0ba7689690b",
    "fileMatch": [
      "epr-manifest.json"
    ],
    "parsers": [
      "json"
    ]
  },
  "type": "object",
  "properties": {
    "site": {
      "description": "A fully qualified URL of your website.",
      "type": "string",
      "format": "uri"
    },
    "maxAge": {
      "description": "Set the max age HTTP cache expiration.",
      "type": "integer"
    },
    "reportUrl": {
      "type": "string",
      "format": "uri"
    },
    "defaultNavBehavior": {
      "$ref": "#/$defs/behavior"
    },
    "defaultResBehavior": {
      "$ref": "#/$defs/behavior"
    },
    "rules": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/rule"
      }
    }
  },
  "required": [
    "rules"
  ],
  "$defs": {
    "behavior": {
      "type": "string",
      "enum": [
        "block",
        "allow",
        "noAuth"
      ]
    },
    "rule": {
      "type": "object",
      "properties": {
        "path": {
          "description": "Relative path to resource.",
          "type": "string"
        },
        "regex": {
          "description": "A regular expression for identifying paths to resources.",
          "type": "string"
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "navigation",
              "image",
              "stylesheet",
              "script",
              "xhr",
              "other"
            ]
          }
        },
        "allowData": {
          "description": "Determines if data is allowed at this path.",
          "type": "boolean"
        }
      }
    }
  },
  "additionalProperties": true,
  "id": "https://json.schemastore.org/epr-manifest.json"
}
