{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tickerfacts-com/json-schema/tickerfacts-com-economic-context-schema.json",
  "title": "EconomicContext",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tickerfacts-com-openapi.json#/components/schemas/EconomicContext",
  "properties": {
    "built_at": {
      "type": "string"
    },
    "series": {
      "items": {
        "properties": {
          "frequency": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "observations": {
            "items": {
              "properties": {
                "date": {
                  "type": "string"
                },
                "value": {
                  "description": "Decimal string, as published.",
                  "type": "string"
                }
              },
              "required": [
                "date",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "source": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "unit",
          "frequency",
          "source",
          "observations"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "sources": {
      "items": {
        "$ref": "#/$defs/Source"
      },
      "type": "array"
    }
  },
  "required": [
    "built_at",
    "sources",
    "series"
  ],
  "type": "object",
  "$defs": {
    "Source": {
      "properties": {
        "coverage": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "license_url": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        },
        "status": {
          "description": "ok, stale or unavailable.",
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "url",
        "license",
        "license_url",
        "retrieved_at",
        "status",
        "coverage"
      ],
      "type": "object"
    }
  }
}