{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 2,
      "maxLength": 100,
      "pattern": "^[a-zA-Z0-9_-]*$"
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "content": {
      "type": "string",
      "format": "uri-reference",
      "minLength": 1
    },
    "fallback": {
      "type": "string",
      "format": "uri-reference",
      "default": ""
    },
    "css": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "format": "uri-reference",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "default": "text/css"
          },
          "crossorigin": {
            "type": "string"
          },
          "disabled": {
            "type": "boolean",
            "default": false
          },
          "hreflang": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "media": {
            "type": "string"
          },
          "rel": {
            "type": "string",
            "default": "stylesheet"
          },
          "as": {
            "type": "string"
          },
          "fetchpriority": {
            "type": "string",
            "pattern": "^high|low|auto$"
          },
          "strategy": {
            "type": "string",
            "pattern": "^lazy|beforeInteractive|afterInteractive|shadow-dom$"
          },
          "scope": {
            "type": "string",
            "pattern": "^content|fallback|all$"
          }
        },
        "required": ["value"]
      },
      "default": []
    },
    "js": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "format": "uri-reference",
            "minLength": 1
          },
          "type": {
            "type": "string"
          },
          "referrerpolicy": {
            "type": "string"
          },
          "crossorigin": {
            "type": "string"
          },
          "integrity": {
            "type": "string"
          },
          "nomodule": {
            "type": "boolean",
            "default": false
          },
          "async": {
            "type": "boolean",
            "default": false
          },
          "defer": {
            "type": "boolean",
            "default": false
          },
          "fetchpriority": {
            "type": "string",
            "pattern": "^high|low|auto$"
          },
          "strategy": {
            "type": "string",
            "pattern": "^lazy|beforeInteractive|afterInteractive|shadow-dom$"
          },
          "scope": {
            "type": "string",
            "pattern": "^content|fallback|all$"
          }
        },
        "required": ["value"]
      },
      "default": []
    },

    "proxy": {
      "type": ["object", "array"],
      "default": {},
      "anyOf": [
        {
          "type": "object",
          "maxProperties": 4,
          "patternProperties": {
            ".*": {
              "type": "string",
              "format": "uri-reference"
            }
          }
        },
        {
          "type": "array",
          "maxItems": 4,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "target": {
                "type": "string",
                "format": "uri-reference",
                "minLength": 1
              },
              "name": {
                "type": "string"
              }
            },
            "required": ["target", "name"]
          }
        }
      ]
    },
    "team": {
      "type": "string",
      "default": ""
    }
  },
  "required": ["name", "version", "content"]
}
