Skip to content

feat: add OpenAPI specification and Swagger UI for API documentation#17

Open
reldothescribe wants to merge 1 commit intoethpandaops:masterfrom
reldothescribe:feat/openapi-spec
Open

feat: add OpenAPI specification and Swagger UI for API documentation#17
reldothescribe wants to merge 1 commit intoethpandaops:masterfrom
reldothescribe:feat/openapi-spec

Conversation

@reldothescribe
Copy link

This PR adds comprehensive OpenAPI documentation for the ethpandaops MCP server.

Changes

  • OpenAPI 3.0 Specification (docs/openapi.yaml): Complete API spec covering:

    • MCP Protocol endpoints (/mcp, /sse, /message)
    • Health check endpoints (/health, /ready)
    • OAuth authentication (/.well-known/, /auth/)
    • Proxy endpoints (/datasources, /clickhouse/, /prometheus/, /loki/, /s3/)
    • All request/response schemas with examples
  • New pkg/openapi Package: Handler to serve:

    • /openapi.json - OpenAPI spec in JSON format
    • /openapi.yaml - OpenAPI spec in YAML format
    • /docs - Swagger UI for interactive API exploration
  • Integration: Both MCP server and proxy server now serve the OpenAPI documentation

Testing

  • All existing tests pass
  • Build succeeds with go build ./...

Endpoints Added

Endpoint Description
GET /openapi.json OpenAPI specification (JSON)
GET /openapi.yaml OpenAPI specification (YAML)
GET /docs Swagger UI interactive documentation

- Create comprehensive OpenAPI 3.0 spec for all endpoints (/mcp, /health, /sandbox, /auth, /clickhouse, etc.)
- Serve spec at /openapi.json and /openapi.yaml
- Serve Swagger UI at /docs for interactive API exploration
- Document all request/response schemas with examples
- Include MCP protocol, OAuth authentication, and proxy endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant