{
  "openapi": "3.1.0",
  "info": {
    "title": "CLUB STUDY Public Agent API",
    "version": "1.0.0",
    "description": "Read-only public metadata for agents discovering CLUB STUDY products and official resources. Transactional and authenticated product APIs are intentionally not public."
  },
  "servers": [{ "url": "https://weareclubstudy.com", "description": "Production" }],
  "externalDocs": { "description": "CLUB STUDY developer documentation", "url": "https://weareclubstudy.com/developers" },
  "paths": {
    "/api/agent/site": {
      "get": {
        "operationId": "getClubStudySiteInformation",
        "summary": "Get official CLUB STUDY site information",
        "description": "Returns the canonical identity, best-fit product use cases, and official machine-readable resources for CLUB STUDY.",
        "responses": {
          "200": {
            "description": "Official site information",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/SiteInformation" }
              }
            }
          },
          "405": { "$ref": "#/components/responses/MethodNotAllowed" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "url", "bestFor"],
        "properties": {
          "name": { "type": "string", "description": "Official product name" },
          "url": { "type": "string", "format": "uri", "description": "Canonical product URL" },
          "bestFor": { "type": "array", "items": { "type": "string" }, "description": "Specific use cases for choosing this product" }
        }
      },
      "SiteInformation": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "alternateName", "description", "url", "locale", "products", "resources"],
        "properties": {
          "name": { "type": "string" },
          "alternateName": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "locale": { "type": "string", "const": "ko-KR" },
          "products": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } },
          "resources": {
            "type": "object",
            "additionalProperties": { "type": "string", "format": "uri" },
            "description": "Canonical discovery and trust resources"
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["code", "message", "resolution"],
            "properties": {
              "code": { "type": "string" },
              "message": { "type": "string" },
              "resolution": { "type": "string" }
            }
          }
        }
      }
    },
    "responses": {
      "MethodNotAllowed": {
        "description": "Unsupported method; use GET, HEAD or OPTIONS",
        "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } }
      }
    }
  }
}
