{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/election-org/main/json-schema/election-org-public-data-response-schema.json",
  "title": "PublicDataResponse",
  "x-generated": "2026-10-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/election-org-openapi-openapi.json#/components/schemas/PublicDataResponse",
  "type": "object",
  "required": [
    "data",
    "citation"
  ],
  "properties": {
    "data": {},
    "citation": {
      "$ref": "#/$defs/Citation"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "Citation": {
      "type": "object",
      "description": "Suggested attribution, not a forced backlink or new license. Collection sources are not necessarily evidence for every returned record. Dates are not request generation times.",
      "required": [
        "suggested_credit",
        "record_url",
        "record_urls",
        "credit_url",
        "original_sources",
        "updated_at",
        "verified_at",
        "guidance_url",
        "rights_note"
      ],
      "properties": {
        "suggested_credit": {
          "type": "string"
        },
        "record_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "record_urls": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          }
        },
        "credit_url": {
          "type": "string",
          "format": "uri"
        },
        "original_sources": {
          "type": "array",
          "description": "Returned-data source references. References explicitly marked applies_to_returned_records: false remain in response sources but are excluded here.",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "verified_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "record_date": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Date on the cited record, not a source check or dataset update"
              }
            }
          }
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Explicit dataset update date, or null when unspecified"
        },
        "verified_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Latest stated source check; does not establish freshness of every record"
        },
        "dates_note": {
          "type": "string"
        },
        "source_scope": {
          "type": "string"
        },
        "source_summary_truncated": {
          "type": "boolean"
        },
        "guidance_url": {
          "type": "string",
          "format": "uri"
        },
        "rights_note": {
          "type": "string"
        }
      }
    }
  }
}