{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/africacompliancedata-com/json-schema/africacompliancedata-com-envelope-base-schema.json",
  "title": "EnvelopeBase",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/africacompliancedata-com-holidays-and-business-days-api-openapi.yml#/components/schemas/EnvelopeBase",
  "type": "object",
  "properties": {
    "country": {
      "type": "string"
    },
    "country_name": {
      "type": "string"
    },
    "coverage": {
      "$ref": "#/$defs/Coverage"
    },
    "warning": {
      "type": "string",
      "description": "When coverage is partial or gap, the year's holiday list is incomplete, or no value can be given"
    },
    "sources": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Source"
      }
    },
    "dataset_version": {
      "type": "string"
    },
    "data_revision": {
      "$ref": "#/$defs/DataRevision"
    },
    "disclaimer": {
      "type": "string"
    }
  },
  "required": [
    "country",
    "coverage",
    "sources",
    "dataset_version",
    "disclaimer"
  ],
  "$defs": {
    "Coverage": {
      "type": "string",
      "enum": [
        "ready",
        "partial",
        "gap"
      ]
    },
    "DataRevision": {
      "type": "string",
      "description": "Short commit id of the data the answer was built from (e.g. 928cb72b). dataset_version is the build date: the daily rebuild changes it with no data change, while data_revision changes only when the data does. Keep it with saved results to know exactly which data you used."
    },
    "Source": {
      "type": "object",
      "properties": {
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "null when the official text is not available online; 'note' then explains it"
        },
        "note": {
          "type": "string",
          "description": "Present when url is null"
        },
        "legal_basis": {
          "type": "string"
        },
        "source_type": {
          "type": "string",
          "description": "e.g. statute, gazette, revenue_authority; 'secondary' when no official text has been confirmed"
        },
        "effective_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "confidence": {
          "type": "string",
          "enum": [
            "high",
            "medium",
            "low"
          ]
        },
        "last_verified": {
          "type": "string",
          "format": "date"
        }
      }
    }
  }
}