{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "schema_version": {
      "const": "1.0"
    },
    "package_type": {
      "enum": [
        "mod",
        "soundpack"
      ]
    },
    "id": {
      "type": "string",
      "minLength": 1,
      "pattern": "^(?=.*\\S)[^/\\\\?#]+$"
    },
    "display_name": {
      "type": "string"
    },
    "short_description": {
      "type": "string",
      "maxLength": 200
    },
    "description": {
      "type": "string"
    },
    "author": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "license": {
      "type": "string"
    },
    "homepage": {
      "type": "string",
      "format": "uri"
    },
    "version": {
      "type": "string"
    },
    "previous_releases": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "enum": [
                  "github_archive",
                  "gitlab_archive",
                  "direct_url"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "commit_sha": {
                "type": "string",
                "pattern": "^[a-f0-9]{40}$"
              },
              "extract_path": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "url"
            ]
          },
          "released_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "version",
          "source"
        ]
      }
    },
    "yanked": {
      "type": "object",
      "properties": {
        "reason": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "reason"
      ]
    },
    "dependencies": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      }
    },
    "conflicts": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      }
    },
    "source": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "github_archive",
            "gitlab_archive",
            "direct_url"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "commit_sha": {
          "type": "string",
          "pattern": "^[a-f0-9]{40}$"
        },
        "extract_path": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "url"
      ]
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "icon_url": {
      "type": "string"
    },
    "modinfo_url": {
      "type": "string",
      "format": "uri"
    },
    "uses_lua": {
      "type": "boolean"
    },
    "lua_api_version": {
      "type": "integer"
    },
    "autoupdate": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "tag",
            "commit"
          ]
        },
        "update_url": {
          "type": "string"
        },
        "branch": {
          "type": "string"
        },
        "regex": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ]
    },
    "parent": {
      "type": "string",
      "minLength": 1,
      "pattern": "^(?=.*\\S)[^/\\\\?#]+$"
    },
    "last_updated": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "schema_version",
    "id",
    "display_name",
    "short_description",
    "author",
    "license",
    "version",
    "source"
  ]
}
