{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hubvibe-io-com/json-schema/hubvibe-io-com-result-292aa4f4-schema.json",
  "title": "Result_292aa4f4",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hubvibe-io-com-openapi.json#/components/schemas/Result_292aa4f4",
  "type": "object",
  "properties": {
    "indicator": {
      "type": "object",
      "properties": {
        "alias": {
          "type": [
            "string",
            "null"
          ],
          "description": "Alias used; null for a raw code."
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "World Bank indicator code; null for Eurostat monthly series."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The source's name for the series."
        },
        "unit": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unit when the source states it."
        }
      },
      "required": [
        "alias",
        "code",
        "name",
        "unit"
      ],
      "description": "What was measured."
    },
    "country": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "Country code as the source spells it."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Country name from the source."
        }
      },
      "required": [
        "code",
        "name"
      ],
      "description": "Where."
    },
    "frequency": {
      "type": "string",
      "enum": [
        "annual",
        "monthly"
      ],
      "description": "Period of the observations."
    },
    "source": {
      "type": "string",
      "enum": [
        "world-bank",
        "eurostat"
      ],
      "description": "Which official source answered."
    },
    "observations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "period": {
            "type": "string",
            "description": "Year (2025) or month (2026-08)."
          },
          "value": {
            "type": [
              "number",
              "null"
            ],
            "description": "Value; null when not yet published."
          }
        },
        "required": [
          "period",
          "value"
        ],
        "description": "One observation."
      },
      "description": "Oldest first."
    },
    "observation_count": {
      "type": "integer",
      "description": "Observations returned."
    },
    "latest": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "period": {
          "type": "string",
          "description": "Period."
        },
        "value": {
          "type": "number",
          "description": "Value."
        }
      },
      "required": [
        "period",
        "value"
      ],
      "description": "Most recent published value; null when none in the window."
    },
    "previous": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "period": {
          "type": "string",
          "description": "Period."
        },
        "value": {
          "type": "number",
          "description": "Value."
        }
      },
      "required": [
        "period",
        "value"
      ],
      "description": "The published value before it; null when none."
    },
    "change": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "absolute": {
          "type": "number",
          "description": "latest minus previous."
        },
        "pct": {
          "type": [
            "number",
            "null"
          ],
          "description": "Change as a percentage of previous; null when previous is zero."
        }
      },
      "required": [
        "absolute",
        "pct"
      ],
      "description": "Latest versus previous; null when either is missing."
    },
    "as_of": {
      "type": [
        "string",
        "null"
      ],
      "description": "The source's own update stamp."
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where the numbers came from."
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "A caveat."
      },
      "description": "Caveats; empty when none."
    },
    "checked_at": {
      "type": "string",
      "format": "date-time",
      "description": "When this node read the source (UTC). Nothing here is cached."
    }
  },
  "required": [
    "indicator",
    "country",
    "frequency",
    "source",
    "observations",
    "observation_count",
    "latest",
    "previous",
    "change",
    "as_of",
    "source_url",
    "notes",
    "checked_at"
  ]
}