{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medcehub/json-schema/medcehub-requirement-document-schema.json",
  "title": "RequirementDocument",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medcehub-openapi.yml#/components/schemas/RequirementDocument",
  "type": "object",
  "properties": {
    "jsonapi": {
      "$ref": "#/$defs/JsonApi"
    },
    "data": {
      "$ref": "#/$defs/Requirement"
    }
  },
  "$defs": {
    "JsonApi": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        }
      }
    },
    "Requirement": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "const": "requirements"
        },
        "id": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "state": {
              "type": "string"
            },
            "state_name": {
              "type": "string"
            },
            "profession": {
              "type": "string"
            },
            "board_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "board_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "rules": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Rule"
              }
            },
            "medcehub_url": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "links": {
          "type": "object"
        }
      }
    },
    "Rule": {
      "type": "object",
      "description": "One license type, as the state board publishes it.",
      "properties": {
        "license": {
          "type": "string"
        },
        "credits_required": {
          "type": [
            "number",
            "null"
          ]
        },
        "unit": {
          "type": [
            "string",
            "null"
          ]
        },
        "period_months": {
          "type": [
            "integer",
            "null"
          ]
        },
        "no_ce_required": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "cycle_basis": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixed_deadline": {
          "type": [
            "string",
            "null"
          ]
        },
        "cat1_min": {
          "type": [
            "number",
            "null"
          ]
        },
        "online_max_pct": {
          "type": [
            "number",
            "null"
          ]
        },
        "accepted_credit_types": {
          "type": [
            "string",
            "null"
          ]
        },
        "reporting": {
          "type": [
            "string",
            "null"
          ]
        },
        "topics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "topic": {
                "type": "string"
              },
              "hours": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "frequency": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "interval_months": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "who": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "legal_basis": {
          "type": [
            "string",
            "null"
          ]
        },
        "legal_basis_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "renewal_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        }
      }
    }
  }
}