{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-public-holidays-schema.json",
  "title": "PublicHolidays",
  "description": "Paid. Public holidays by country (and is this date one?).",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-openapi.json#/components/schemas/PublicHolidays",
  "type": "object",
  "properties": {
    "country": {
      "type": "string",
      "description": "ISO 3166-1 alpha-2 code"
    },
    "year": {
      "type": "number",
      "description": "The year listed"
    },
    "count": {
      "type": "number",
      "description": "Holidays listed for the year"
    },
    "holidays": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "localName": {
            "type": "string",
            "description": "Name in the country's language"
          },
          "name": {
            "type": "string",
            "description": "Name in English"
          },
          "global": {
            "type": "boolean",
            "description": "True = nationwide; false = only in `regions`"
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO 3166-2 subdivisions it applies in (empty when nationwide)"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The source's classification: Public, Bank, School, Authorities, Optional, Observance"
          }
        },
        "required": [
          "date",
          "localName",
          "name",
          "global",
          "regions",
          "types"
        ]
      },
      "description": "Every holiday the source lists for the country and year, by date — nationwide and regional, all types"
    },
    "dateChecked": {
      "type": [
        "string",
        "null"
      ],
      "description": "The date asked about (default today, UTC); null when another year was asked without a date"
    },
    "isHoliday": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True only when a NATIONWIDE holiday of type Public falls on dateChecked; null when no date was checked"
    },
    "holidaysOnDate": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "localName": {
            "type": "string",
            "description": "Name in the country's language"
          },
          "name": {
            "type": "string",
            "description": "Name in English"
          },
          "global": {
            "type": "boolean",
            "description": "True = nationwide; false = only in `regions`"
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO 3166-2 subdivisions it applies in (empty when nationwide)"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The source's classification: Public, Bank, School, Authorities, Optional, Observance"
          }
        },
        "required": [
          "date",
          "localName",
          "name",
          "global",
          "regions",
          "types"
        ]
      },
      "description": "Nationwide holidays on dateChecked, of any type (a Bank-only or School-only day is here but does not set isHoliday)"
    },
    "regionalHolidaysOnDate": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "localName": {
            "type": "string",
            "description": "Name in the country's language"
          },
          "name": {
            "type": "string",
            "description": "Name in English"
          },
          "global": {
            "type": "boolean",
            "description": "True = nationwide; false = only in `regions`"
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "ISO 3166-2 subdivisions it applies in (empty when nationwide)"
          },
          "types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The source's classification: Public, Bank, School, Authorities, Optional, Observance"
          }
        },
        "required": [
          "date",
          "localName",
          "name",
          "global",
          "regions",
          "types"
        ]
      },
      "description": "Holidays on dateChecked that apply only in some regions"
    },
    "nextHoliday": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "date": {
          "type": "string",
          "description": "YYYY-MM-DD"
        },
        "localName": {
          "type": "string",
          "description": "Name in the country's language"
        },
        "name": {
          "type": "string",
          "description": "Name in English"
        },
        "global": {
          "type": "boolean",
          "description": "True = nationwide; false = only in `regions`"
        },
        "regions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "ISO 3166-2 subdivisions it applies in (empty when nationwide)"
        },
        "types": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The source's classification: Public, Bank, School, Authorities, Optional, Observance"
        }
      },
      "required": [
        "date",
        "localName",
        "name",
        "global",
        "regions",
        "types"
      ],
      "description": "The first nationwide Public holiday after dateChecked in the same year; null when none remains that year (ask for the next year) or no date was checked"
    },
    "source": {
      "type": "string",
      "description": "Where the calendar came from"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time the source was read (answers are cached up to 12 h)"
    },
    "note": {
      "type": "string",
      "description": "How isHoliday is decided, and what the source does and does not cover"
    },
    "defaulted": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "field",
        "to",
        "value",
        "note"
      ],
      "description": "Present only when the body was empty: which subject the answer is for, and why"
    }
  },
  "required": [
    "country",
    "year",
    "count",
    "holidays",
    "dateChecked",
    "isHoliday",
    "holidaysOnDate",
    "regionalHolidaysOnDate",
    "nextHoliday",
    "source",
    "asOf",
    "note"
  ]
}