{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://qhsetech.com/data/rankings.schema.json",
  "title": "QHSE software rankings archive (withdrawn)",
  "description": "Validates the structure of the rankings file. The June 2026 lists were withdrawn on 23 September 2026; a withdrawn file carries an empty rankings array.",
  "type": "object",
  "required": [
    "name",
    "status",
    "as_of",
    "version",
    "license",
    "rankings"
  ],
  "properties": {
    "name": {
      "type": "string"
    },
    "status": {
      "enum": [
        "historical-unverified",
        "withdrawn"
      ]
    },
    "as_of": {
      "type": "string",
      "format": "date"
    },
    "version": {
      "type": "string"
    },
    "license": {
      "type": "string",
      "format": "uri"
    },
    "rankings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "key",
          "title",
          "url",
          "top"
        ],
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "top": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "rank",
                "id",
                "name"
              ],
              "properties": {
                "rank": {
                  "type": "integer",
                  "minimum": 1
                },
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          }
        }
      }
    }
  }
}
