{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/vynedental/main/json-schema/vynedental-plan-type-schema.json",
  "title": "PlanType",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vynedental-eligibility-api-openapi.yml#/components/schemas/PlanType",
  "type": "object",
  "properties": {
    "disclaimers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "end_date": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$"
    },
    "group_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "group_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "group_or_policy_number": {
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "insurance_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "number": {
      "type": [
        "string",
        "null"
      ]
    },
    "payer_plan_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "payer_plan_identifier": {
      "type": [
        "string",
        "null"
      ]
    },
    "payer_plan_description": {
      "type": [
        "string",
        "null"
      ]
    },
    "plan_type": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/PlanTypeEnum"
        }
      ]
    },
    "policy_period": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/PolicyPeriodEnum"
        }
      ]
    },
    "start_date": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^(0[1-9]|1[0-2])\\/(0[1-9]|[12][0-9]|3[01])\\/\\d{4}$"
    }
  },
  "required": [
    "disclaimers",
    "end_date",
    "group_name",
    "group_number",
    "group_or_policy_number",
    "id",
    "insurance_type",
    "name",
    "number",
    "payer_plan_name",
    "payer_plan_identifier",
    "payer_plan_description",
    "plan_type",
    "policy_period",
    "start_date"
  ],
  "additionalProperties": false,
  "$defs": {
    "PlanTypeEnum": {
      "type": "string",
      "enum": [
        "GOV",
        "HMO",
        "IDM",
        "POS",
        "PPO",
        "GROUP_POLICY",
        "UKN"
      ]
    },
    "PolicyPeriodEnum": {
      "type": "string",
      "enum": [
        "CALENDAR",
        "PLAN"
      ]
    }
  }
}