{
  "openapi": "3.1.0",
  "info": {
    "title": "Jours libres API",
    "version": "1.0.0",
    "description": "Open data API of public holidays and school holidays, zone by zone. Read only, JSON, no key. Data under ODbL 1.0: attribution and share-alike for derived databases. Rate limited per IP address; use /v1/export.json.gz for bulk use.",
    "license": {
      "name": "ODbL-1.0 (data), MIT (code)",
      "url": "https://opendatacommons.org/licenses/odbl/1-0/"
    }
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "tags": [
    {
      "name": "Countries"
    },
    {
      "name": "Holidays"
    },
    {
      "name": "Meta"
    }
  ],
  "paths": {
    "/v1": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "index",
        "summary": "Entry point listing the endpoints",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/countries": {
      "get": {
        "tags": [
          "Countries"
        ],
        "operationId": "listCountries",
        "summary": "Countries and what the API provides for each",
        "parameters": [
          {
            "name": "includeUncovered",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Also list ISO countries without any data."
          },
          {
            "name": "europeanUnion",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "Only the 27 member states of the European Union."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Country"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/countries/{code}": {
      "get": {
        "tags": [
          "Countries"
        ],
        "operationId": "getCountry",
        "summary": "Coverage, zones and official texts of a country",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CountryDetail"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/countries/{code}/subdivisions": {
      "get": {
        "tags": [
          "Countries"
        ],
        "operationId": "listSubdivisions",
        "summary": "Selectable subdivisions with their school zone and public holiday zone",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Search by name or code, accents and case ignored."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Subdivision"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/countries/{code}/zones": {
      "get": {
        "tags": [
          "Countries"
        ],
        "operationId": "listZones",
        "summary": "School zones and public holiday zones with their subdivisions",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "school",
                "public"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Zone"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ListMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/public-holidays": {
      "get": {
        "tags": [
          "Holidays"
        ],
        "operationId": "listPublicHolidays",
        "summary": "Public holidays of a country, a subdivision or a zone",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "subdivision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Subdivision code, for example FR-D69, DE-BY, CH-GE.",
            "example": "FR-D69"
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Zone code of the same kind as the list, instead of a subdivision.",
            "example": "FR-ZA"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1900,
              "maximum": 2100
            },
            "description": "A whole calendar year. Not combinable with from/to."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First day of the range (inclusive)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last day of the range (inclusive). A range spans at most 1096 days."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Holiday"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PeriodMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/school-holidays": {
      "get": {
        "tags": [
          "Holidays"
        ],
        "operationId": "listSchoolHolidays",
        "summary": "School holidays of a country, a subdivision or a zone",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "subdivision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Subdivision code, for example FR-D69, DE-BY, CH-GE.",
            "example": "FR-D69"
          },
          {
            "name": "zone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Zone code of the same kind as the list, instead of a subdivision.",
            "example": "FR-ZA"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1900,
              "maximum": 2100
            },
            "description": "A whole calendar year. Not combinable with from/to."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First day of the range (inclusive)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last day of the range (inclusive). A range spans at most 1096 days."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Holiday"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PeriodMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/calendar": {
      "get": {
        "tags": [
          "Holidays"
        ],
        "operationId": "getCalendar",
        "summary": "Public holidays and school holidays together",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "subdivision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Subdivision code, for example FR-D69, DE-BY, CH-GE.",
            "example": "FR-D69"
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1900,
              "maximum": 2100
            },
            "description": "A whole calendar year. Not combinable with from/to."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First day of the range (inclusive)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last day of the range (inclusive). A range spans at most 1096 days."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "publicHolidays": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Holiday"
                          }
                        },
                        "schoolHolidays": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Holiday"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PeriodMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/is-holiday": {
      "get": {
        "tags": [
          "Holidays"
        ],
        "operationId": "isHoliday",
        "summary": "Whether a date is a public holiday or a school holiday",
        "description": "With a subdivision, isPublicHoliday and isSchoolHoliday apply to it; without one, only to the whole country.",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "subdivision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Subdivision code, for example FR-D69, DE-BY, CH-GE.",
            "example": "FR-D69"
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Defaults to today in the zone time zone."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date"
                        },
                        "weekday": {
                          "type": "string"
                        },
                        "isPublicHoliday": {
                          "type": "boolean"
                        },
                        "isSchoolHoliday": {
                          "type": "boolean"
                        },
                        "publicHolidays": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Holiday"
                          }
                        },
                        "schoolHolidays": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Holiday"
                          }
                        }
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/PeriodMeta"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/calendar.ics": {
      "get": {
        "tags": [
          "Holidays"
        ],
        "operationId": "getCalendarFeed",
        "summary": "iCalendar feed of public holidays and school holidays",
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            },
            "description": "ISO 3166-1 alpha-2 country code.",
            "example": "FR"
          },
          {
            "name": "subdivision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Subdivision code, for example FR-D69, DE-BY, CH-GE.",
            "example": "FR-D69"
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First day of the range (inclusive)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last day of the range (inclusive). A range spans at most 1096 days."
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2}$"
            },
            "description": "ISO 639-1 language of name fields. Defaults to Accept-Language, then English."
          }
        ],
        "responses": {
          "200": {
            "description": "iCalendar (RFC 5545), all day events marked transparent",
            "content": {
              "text/calendar": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/sources": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "listSources",
        "summary": "Sources, licences and last synchronisation",
        "responses": {
          "200": {
            "description": "Success",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimitLimit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimitRemaining"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              },
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/export.json.gz": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "downloadExport",
        "summary": "Full dataset as gzipped JSON, for bulk use",
        "responses": {
          "200": {
            "description": "Gzipped JSON document with meta, countries, subdivisions, zones and periods",
            "content": {
              "application/gzip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "503": {
            "description": "Export not generated yet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "operationId": "health",
        "summary": "Service status, not rate limited",
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "empty"
                      ]
                    },
                    "periods": {
                      "type": "integer"
                    },
                    "lastSync": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "export": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimitLimit": {
        "description": "Requests allowed in the tightest window",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitRemaining": {
        "description": "Requests left in the tightest window",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimitPolicy": {
        "description": "Windows applied, for example 60;w=60, 5000;w=86400",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid parameter",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown country, subdivision or zone",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit reached",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait"
          },
          "RateLimit-Reset": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_parameter",
              "not_found",
              "method_not_allowed",
              "rate_limited",
              "export_not_ready",
              "internal_error",
              "http_error"
            ]
          },
          "message": {
            "type": "string"
          },
          "parameter": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "retryAfter": {
            "type": "integer"
          }
        }
      },
      "Names": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Translations keyed by ISO 639-1 language"
      },
      "ZoneReference": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "KindCoverage": {
        "type": "object",
        "required": [
          "available"
        ],
        "properties": {
          "available": {
            "type": "boolean"
          },
          "granularity": {
            "type": "string",
            "enum": [
              "national",
              "regional",
              "indicative"
            ]
          },
          "zones": {
            "type": "integer"
          },
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "years": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "schoolYears": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{4}$"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Country": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "$ref": "#/components/schemas/Names"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "europeanUnion": {
            "type": "boolean"
          },
          "covered": {
            "type": "boolean"
          },
          "subdivisionCount": {
            "type": "integer"
          },
          "publicHolidays": {
            "$ref": "#/components/schemas/KindCoverage"
          },
          "schoolHolidays": {
            "$ref": "#/components/schemas/KindCoverage"
          },
          "links": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      },
      "CountryDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Country"
          },
          {
            "type": "object",
            "properties": {
              "zones": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Zone"
                }
              },
              "notes": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "educationLevel": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "officialDocuments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Document"
                }
              }
            }
          }
        ]
      },
      "Document": {
        "type": "object",
        "properties": {
          "publisher": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "retrieved": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          }
        }
      },
      "Subdivision": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "$ref": "#/components/schemas/Names"
          },
          "qualifier": {
            "type": [
              "string",
              "null"
            ]
          },
          "schoolZone": {
            "$ref": "#/components/schemas/ZoneReference"
          },
          "publicHolidayZone": {
            "$ref": "#/components/schemas/ZoneReference"
          },
          "timezone": {
            "type": "string"
          }
        }
      },
      "Zone": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "school",
              "public"
            ]
          },
          "name": {
            "type": "string"
          },
          "names": {
            "$ref": "#/components/schemas/Names"
          },
          "timezone": {
            "type": "string"
          },
          "subdivisionCount": {
            "type": "integer"
          },
          "subdivisions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Holiday": {
        "type": "object",
        "required": [
          "startDate",
          "endDate",
          "dayCount",
          "name",
          "names",
          "nationwide",
          "zones",
          "source"
        ],
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Public holidays only"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date",
            "description": "Inclusive"
          },
          "dayCount": {
            "type": "integer"
          },
          "weekday": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "names": {
            "$ref": "#/components/schemas/Names"
          },
          "nationwide": {
            "type": "boolean"
          },
          "zones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Empty when nationwide is true"
          },
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "fr-education",
                  "fr-gouv",
                  "openholidays",
                  "nager",
                  "official"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "license": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "document": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Document"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        }
      },
      "Source": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "publisher": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "licenseUrl": {
            "type": "string"
          },
          "covers": {
            "type": "string"
          },
          "lastRun": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "licenseUrl": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          }
        }
      },
      "ListMeta": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              }
            }
          }
        ]
      },
      "PeriodMeta": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          },
          {
            "type": "object",
            "properties": {
              "country": {
                "$ref": "#/components/schemas/ZoneReference"
              },
              "subdivision": {
                "$ref": "#/components/schemas/ZoneReference"
              },
              "schoolZone": {
                "$ref": "#/components/schemas/ZoneReference"
              },
              "publicHolidayZone": {
                "$ref": "#/components/schemas/ZoneReference"
              },
              "zone": {
                "$ref": "#/components/schemas/ZoneReference"
              },
              "kind": {
                "type": "string"
              },
              "timezone": {
                "type": "string"
              },
              "from": {
                "type": "string",
                "format": "date"
              },
              "to": {
                "type": "string",
                "format": "date"
              },
              "count": {
                "type": "integer"
              }
            }
          }
        ]
      }
    }
  }
}
