{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/statisticsoftheworld-com/json-schema/statisticsoftheworld-com-ecb-annual-point-schema.json",
  "title": "EcbAnnualPoint",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/statisticsoftheworld-com-openapi.yml#/components/schemas/EcbAnnualPoint",
  "type": "object",
  "required": [
    "year",
    "value",
    "unit",
    "measurement"
  ],
  "properties": {
    "year": {
      "type": "integer"
    },
    "value": {
      "type": [
        "number",
        "null"
      ]
    },
    "unit": {
      "type": "string",
      "description": "Historical quote currency per EUR, such as RON per EUR. Never infer the current national currency."
    },
    "measurement": {
      "type": "object",
      "required": [
        "kind",
        "quote_currency",
        "base_currency",
        "series_id",
        "aggregation",
        "observation_present",
        "capture_sha256",
        "source_retrieved_at"
      ],
      "properties": {
        "kind": {
          "const": "ecb_annual_fx"
        },
        "quote_currency": {
          "type": "string"
        },
        "base_currency": {
          "const": "EUR"
        },
        "series_id": {
          "type": "string"
        },
        "source_url": {
          "type": "string",
          "format": "uri"
        },
        "aggregation": {
          "const": "annual_average"
        },
        "observation_present": {
          "type": "boolean",
          "description": "True for an actual source observation, even if its numeric value is null. False means no observation is present in the captured scope; no period or record ID is invented."
        },
        "period_start": {
          "type": [
            "string",
            "null"
          ]
        },
        "period_end": {
          "type": [
            "string",
            "null"
          ],
          "description": "Original annual source boundaries and offsets; not proof of complete sampling or final status."
        },
        "observation_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "observation_status_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Publisher status; A/Normal value does not establish final observed data."
        },
        "confidentiality": {
          "type": [
            "string",
            "null"
          ],
          "description": "Source confidentiality code, not a licence grant."
        },
        "source_note": {
          "type": [
            "string",
            "null"
          ]
        },
        "compilation_note": {
          "type": [
            "string",
            "null"
          ]
        },
        "raw_source_value": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_record_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "capture_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "capture_url": {
          "type": "string",
          "format": "uri"
        },
        "source_retrieved_at": {
          "type": "string",
          "description": "Original retrieval time of this pair’s ECB response, distinct from capture construction, activation and unknown publisher vintage."
        },
        "coverage_start_year": {
          "type": "integer"
        },
        "coverage_end_year": {
          "type": "integer"
        },
        "missing_years": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      }
    }
  }
}