{
  "openapi": "3.1.0",
  "info": {
    "title": "Dividend Watcher public API",
    "description": "Live Canadian ETF monthly distribution announcements, Drop Watch estimates, and 3-month payment variations. No authentication. Not financial advice.",
    "version": "1.1.0",
    "contact": {
      "name": "Rémi Penot",
      "email": "remi@etfwatcher.ca",
      "url": "https://etfwatcher.ca"
    }
  },
  "servers": [
    { "url": "https://etfwatcher.ca" }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Worker health and Toronto window state",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "Worker is up",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": { "type": "boolean" },
                    "service": { "type": "string", "example": "dividend-watcher" },
                    "toronto": { "type": "object" },
                    "in_window": { "type": "boolean" },
                    "in_brompton_window": { "type": "boolean" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "summary": "Current-month announcement board and Drop Watch",
        "operationId": "getStatus",
        "responses": {
          "200": {
            "description": "Live dashboard payload",
            "content": {
              "application/json": {
                "schema": { "type": "object" }
              }
            }
          }
        }
      }
    },
    "/api/distributions": {
      "get": {
        "summary": "170+ Canadian ETFs with 3 rolling months of per-payment amounts",
        "operationId": "getDistributions",
        "responses": {
          "200": {
            "description": "Funds grouped by issuer",
            "content": {
              "application/json": {
                "schema": { "type": "object" }
              }
            }
          }
        }
      }
    }
  }
}
