{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oyster-hr/json-schema/oyster-hr-enrollment-schema.json",
  "title": "enrollment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oyster-hr-benefits-api-openapi.yml#/components/schemas/enrollment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "plan": {
      "$ref": "#/$defs/benefitPlan"
    },
    "package": {
      "$ref": "#/$defs/benefitPackage"
    },
    "employerContribution": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "dependents": {
          "type": [
            "number",
            "null"
          ]
        },
        "max_dependents_covered": {
          "type": [
            "number",
            "null"
          ]
        },
        "teamMember": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "totalCost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "decimal": {
          "type": "string",
          "pattern": "^\\d+([.]\\d+)?$"
        },
        "currencyCode": {
          "type": "string",
          "minLength": 3,
          "maxLength": 3
        }
      }
    },
    "totalEmployerContributionCost": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "decimal": {
          "type": "string",
          "pattern": "^\\d+([.]\\d+)?$"
        },
        "currencyCode": {
          "type": "string",
          "minLength": 3,
          "maxLength": 3
        }
      }
    },
    "coveragePeriod": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "fromDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        },
        "toDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date"
        }
      }
    }
  },
  "$defs": {
    "benefitPackage": {
      "properties": {
        "id": {
          "type": "string"
        },
        "fee": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "currencyCode": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "decimal": {
              "type": "string",
              "pattern": "^\\d+([.]\\d+)?$"
            }
          }
        },
        "name": {
          "type": "string"
        },
        "plans": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/benefitPlan"
          }
        }
      }
    },
    "benefitPlan": {
      "properties": {
        "category": {
          "type": "string"
        },
        "estimatedPrice": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "currencyCode": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "decimal": {
              "type": "string",
              "pattern": "^\\d+([.]\\d+)?$"
            }
          },
          "required": [
            "currencyCode",
            "decimal"
          ]
        },
        "fee": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "currencyCode": {
              "type": "string",
              "minLength": 3,
              "maxLength": 3
            },
            "decimal": {
              "type": "string",
              "pattern": "^\\d+([.]\\d+)?$"
            }
          },
          "required": [
            "currencyCode",
            "decimal"
          ]
        },
        "guideUrl": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "link": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}