{
  "openapi": "3.1.0",
  "info": {
    "title": "Aptos Governance API",
    "version": "1.0.0",
    "description": "Public read API for on-chain Aptos Improvement Proposals. Voting remains wallet-signed on chain."
  },
  "servers": [
    {
      "url": "https://governance.aptosfoundation.org",
      "description": "This deployment"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness and discovery pointers",
        "responses": {
          "200": {
            "description": "Service is up",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/proposals": {
      "get": {
        "operationId": "listProposals",
        "summary": "List proposals, newest first",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated proposal list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/proposals/{proposalId}": {
      "get": {
        "operationId": "getProposal",
        "summary": "Get one proposal",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proposal detail"
          },
          "404": {
            "description": "Unknown proposal id"
          }
        }
      }
    },
    "/api/proposals/{proposalId}/votes": {
      "get": {
        "operationId": "listProposalVotes",
        "summary": "Paginated per-pool votes for a proposal",
        "parameters": [
          {
            "name": "proposalId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vote page"
          }
        }
      }
    }
  }
}
