{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://iarpg.com/records/iarpg-standard-record.schema.json",
  "title": "IARPG Operations Standard Record",
  "type": "object",
  "required": [
    "code",
    "slug",
    "title",
    "category",
    "status",
    "version",
    "release",
    "summary",
    "requirements",
    "canonical",
    "json"
  ],
  "properties": {
    "code": {
      "type": "string",
      "pattern": "^[A-Z0-9]+-[0-9]{2}$"
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
    },
    "title": {
      "type": "string",
      "minLength": 3
    },
    "category": {
      "type": "string",
      "minLength": 2
    },
    "status": {
      "enum": [
        "Current",
        "Guidance",
        "Experimental",
        "Deprecated",
        "Withdrawn"
      ]
    },
    "version": {
      "type": "string"
    },
    "release": {
      "const": "IARPG-OPS-2"
    },
    "summary": {
      "type": "string",
      "minLength": 20
    },
    "requirements": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "level",
          "text"
        ],
        "properties": {
          "level": {
            "enum": [
              "MUST",
              "SHOULD",
              "MAY"
            ]
          },
          "text": {
            "type": "string"
          }
        }
      }
    },
    "canonical": {
      "type": "string",
      "format": "uri"
    },
    "json": {
      "type": "string",
      "format": "uri"
    }
  },
  "additionalProperties": true
}
