{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citedtravel-com/json-schema/citedtravel-com-category-response-schema.json",
  "title": "CategoryResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citedtravel-com-openapi.json#/components/schemas/CategoryResponse",
  "type": "object",
  "properties": {
    "country": {
      "type": "object"
    },
    "category": {
      "type": "string"
    },
    "dataset_version": {
      "type": "string"
    },
    "data": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Fact"
      }
    },
    "attribution": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "$defs": {
    "Confidence": {
      "type": "object",
      "required": [
        "score",
        "level",
        "reasons"
      ],
      "properties": {
        "score": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "level": {
          "enum": [
            "high",
            "medium",
            "low"
          ]
        },
        "reasons": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Fact": {
      "type": "object",
      "required": [
        "id",
        "country",
        "category",
        "field",
        "value",
        "sources",
        "last_verified",
        "confidence"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "field": {
          "type": "string"
        },
        "value": {},
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Source"
          }
        },
        "cross_checks": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "last_verified": {
          "type": "string",
          "format": "date"
        },
        "next_review_due": {
          "type": "string",
          "format": "date"
        },
        "confidence": {
          "$ref": "#/$defs/Confidence"
        },
        "attribution": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "localization": {
          "type": "object"
        }
      }
    },
    "Source": {
      "type": "object",
      "required": [
        "source_id",
        "publisher",
        "url",
        "license",
        "retrieved_at"
      ],
      "properties": {
        "source_id": {
          "type": "string"
        },
        "publisher": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "license": {
          "type": "string"
        },
        "retrieved_at": {
          "type": "string"
        },
        "quote": {
          "type": "string"
        },
        "quote_language": {
          "type": "string"
        },
        "source_value": {}
      }
    }
  }
}