{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/e-vignettes-eu/json-schema/e-vignettes-eu-country-detail-schema.json",
  "title": "CountryDetail",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/e-vignettes-eu-openapi.json#/components/schemas/CountryDetail",
  "allOf": [
    {
      "$ref": "#/$defs/CountrySummary"
    },
    {
      "type": "object",
      "required": [
        "subtitle",
        "sections",
        "faq",
        "sources"
      ],
      "properties": {
        "subtitle": {
          "type": "string"
        },
        "sections": {
          "type": "array",
          "description": "The country guide in reading order.",
          "items": {
            "type": "object",
            "required": [
              "heading",
              "paragraphs",
              "bullets"
            ],
            "properties": {
              "heading": {
                "type": "string"
              },
              "paragraphs": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "bullets": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "faq": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "question",
              "answer"
            ],
            "properties": {
              "question": {
                "type": "string"
              },
              "answer": {
                "type": "string"
              }
            }
          }
        },
        "sources": {
          "type": "array",
          "description": "Official pages each fact was checked against.",
          "items": {
            "type": "object",
            "required": [
              "label",
              "url"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "CountrySummary": {
      "type": "object",
      "required": [
        "code",
        "name",
        "iso_code",
        "operator",
        "summary",
        "page_url",
        "products_url",
        "last_reviewed"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2, lower case."
        },
        "name": {
          "type": "string",
          "description": "English country name."
        },
        "iso_code": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2, upper case."
        },
        "operator": {
          "$ref": "#/$defs/Operator"
        },
        "summary": {
          "type": "string",
          "description": "One paragraph on how the country's toll works."
        },
        "page_url": {
          "type": "string",
          "format": "uri",
          "description": "Human country guide."
        },
        "products_url": {
          "type": "string",
          "format": "uri",
          "description": "Products filtered to this country."
        },
        "last_reviewed": {
          "type": "string",
          "format": "date",
          "description": "ISO date the facts were last verified against the operator."
        }
      }
    },
    "Operator": {
      "type": "object",
      "description": "The national authority that issues the toll product.",
      "required": [
        "name",
        "system_name",
        "url"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Official operator, e.g. \"ASFINAG\"."
        },
        "system_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Name of the toll system if it has one, e.g. \"HU-GO\"."
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "Operator website."
        }
      }
    }
  }
}