{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/openpublica-com/json-schema/openpublica-com-operations-schema.json",
  "title": "Operations",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/openpublica-com-openapi.json#/components/schemas/Operations",
  "type": "object",
  "properties": {
    "window": {
      "$ref": "#/$defs/Window"
    },
    "corpus": {
      "type": "object",
      "properties": {
        "meetings": {
          "type": "integer"
        },
        "documents": {
          "type": "integer"
        },
        "governments": {
          "type": "integer"
        },
        "states": {
          "type": "integer",
          "maximum": 50,
          "description": "Distinct states with at least one tracked government. At most 50."
        },
        "includes_dc": {
          "type": "boolean",
          "description": "DC is tracked like a state but is not one. Render the pair as '50 states and DC' rather than adding them into an ambiguous 51."
        },
        "minutes": {
          "type": "integer",
          "description": "Minutes of meeting the corpus holds. Read it with meetings_measured: the corpus predates the duration field, so this is a total over that many meetings, not over all of them."
        },
        "meetings_measured": {
          "type": "integer",
          "description": "Number of stored meetings contributing to minutes. Missing durations reduce coverage; do not assume a backfill is running or complete."
        }
      }
    },
    "published": {
      "type": "object",
      "properties": {
        "meetings": {
          "type": "integer"
        },
        "documents": {
          "type": "integer"
        },
        "minutes": {
          "type": "integer",
          "description": "Minutes of meeting published in the window. Read it with meetings_measured, as above."
        },
        "meetings_measured": {
          "type": "integer",
          "description": "How many of the window's meetings `minutes` was summed over."
        }
      }
    },
    "daily": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "meetings": {
            "type": "integer",
            "description": "Counted by when we PUBLISHED, not when the meeting was held."
          },
          "documents": {
            "type": "integer"
          },
          "cumulative_meetings": {
            "type": "integer",
            "description": "Anchored to the corpus total and walked forward, so the last entry equals corpus.meetings rather than a window subtotal."
          }
        }
      }
    }
  },
  "$defs": {
    "Window": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date"
        },
        "end": {
          "type": "string",
          "format": "date"
        },
        "days": {
          "type": "integer"
        }
      }
    }
  }
}