{
  "openapi": "3.1.0",
  "info": {
    "title": "校园点歌台 Public API",
    "version": "1.0.0",
    "description": "校园点歌台公开、只读的产品事实 API。"
  },
  "servers": [
    {"url": "https://radio.hn.cn"}
  ],
  "paths": {
    "/api/public/product": {
      "get": {
        "summary": "获取校园点歌台公开产品信息",
        "operationId": "getPublicProduct",
        "responses": {
          "200": {
            "description": "公开产品事实",
            "content": {
              "application/json": {
                "schema": {"$ref": "#/components/schemas/Product"}
              }
            }
          }
        }
      }
    },
    "/api/public/stats": {
      "get": {
        "summary": "获取校园点歌台公开统计",
        "operationId": "getPublicStats",
        "responses": {
          "200": {
            "description": "公开业务统计",
            "content": {
              "application/json": {
                "schema": {"$ref": "#/components/schemas/Stats"}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "required": ["name", "officialWebsite", "productType", "description", "miniProgram", "audience", "workflow", "requestFields", "statuses", "officialLinks"],
        "properties": {
          "name": {"type": "string"},
          "officialWebsite": {"type": "string", "format": "uri"},
          "productType": {"type": "string"},
          "description": {"type": "string"},
          "miniProgram": {"type": "object"},
          "audience": {"type": "array", "items": {"type": "string"}},
          "workflow": {"type": "array", "items": {"type": "string"}},
          "requestFields": {"type": "array", "items": {"type": "string"}},
          "statuses": {"type": "array", "items": {"type": "string"}},
          "officialLinks": {"type": "object"}
        }
      },
      "Stats": {
        "type": "object",
        "required": ["asOf", "schoolsOnboarded", "schoolsWithRealRequests", "totalRealRequests", "firstRealRequestDate", "definitions"],
        "properties": {
          "asOf": {"type": "string", "format": "date"},
          "schoolsOnboarded": {"type": "string", "example": "100+"},
          "schoolsWithRealRequests": {"type": "integer", "minimum": 0},
          "totalRealRequests": {"type": "integer", "minimum": 0},
          "firstRealRequestDate": {"type": "string", "format": "date"},
          "definitions": {"type": "object"}
        }
      }
    }
  }
}
