{
  "openapi": "3.1.0",
  "info": {
    "title": "Swiss Living Index API",
    "version": "1.0.0",
    "description": "Open, official-source data for all 26 Swiss cantons (tax, rent, health premiums, sunshine, fiscal health, jobs, migration). Information only, not advice. Attribution: Swiss Living Index (technology: CBI Software · advisory: Mirabello Consultancy). License: CC BY 4.0. For agents, an MCP server is available at /mcp.",
    "license": { "name": "CC BY 4.0", "url": "https://creativecommons.org/licenses/by/4.0/" }
  },
  "servers": [{ "url": "https://swisslivingindex.ch" }],
  "paths": {
    "/v1/cantons": {
      "get": {
        "operationId": "listCantons",
        "summary": "All 26 cantons with all metrics (value, rank, percentile, source, year).",
        "responses": { "200": { "description": "Canton dataset", "content": { "application/json": {} } } }
      }
    },
    "/v1/canton": {
      "get": {
        "operationId": "getCanton",
        "summary": "One canton, all metrics.",
        "parameters": [{ "name": "ak", "in": "query", "required": true, "description": "2-letter canton abbreviation (e.g. ZH, GE, TI).", "schema": { "type": "string" } }],
        "responses": { "200": { "description": "Canton record" }, "404": { "description": "Unknown canton" } }
      }
    },
    "/index.json": {
      "get": { "operationId": "fullDataset", "summary": "The complete open dataset (same data, single file).", "responses": { "200": { "description": "Full index" } } }
    }
  }
}
