{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/baloise/main/json-schema/baloise-cancellation-schema.json",
  "title": "Cancellation",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/baloise-corellia-contracts-openapi.yml#/components/schemas/Cancellation",
  "required": [
    "action",
    "identifier"
  ],
  "type": "object",
  "properties": {
    "identifier": {
      "$ref": "#/$defs/Identifier"
    },
    "action": {
      "$ref": "#/$defs/Action"
    }
  },
  "$defs": {
    "Action": {
      "required": [
        "reason",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "integer",
          "description": "The type of the action",
          "format": "int32"
        },
        "reason": {
          "type": "integer",
          "description": "The reason for this type",
          "format": "int32"
        },
        "effective": {
          "type": "string",
          "description": "The date when this change should be effective",
          "format": "date"
        }
      }
    },
    "Identifier": {
      "required": [
        "id",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id depending on the type."
        },
        "type": {
          "type": "string",
          "description": "The type of the id. EXT or INT.",
          "enum": [
            "INT",
            "EXT"
          ]
        }
      }
    }
  }
}