Skip to content

feat: Serve OpenAPI spec via Swagger UI at /docs #152

Description

@dotunv

Overview

Add a Swagger/OpenAPI UI endpoint that serves the existing docs/openapi.yaml as an interactive API explorer.

Motivation

The README has a full API reference and docs/openapi.yaml exists, but there is no way for developers to interactively explore and test the API from a browser. Serving the OpenAPI spec via Swagger UI dramatically improves the developer experience.

Proposed Design

  1. Add GET /docs endpoint serving Swagger UI
  2. Swagger UI loads the OpenAPI spec from GET /docs/openapi.yaml
  3. Serve the spec file from the docs/ directory
  4. Swagger UI is available in all environments (not just development)
  5. Add a link to the docs endpoint in the API root response

Acceptance Criteria

  • GET /docs returns an interactive Swagger UI page
  • Swagger UI loads and renders the OpenAPI spec correctly
  • All API endpoints are documented and explorable via the UI
  • Try It Out feature works for authenticated endpoints (supports API key input)
  • /docs endpoint does not require authentication to view
  • OpenAPI spec is served from GET /docs/openapi.yaml
  • Response includes a link to /docs in the root API response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbackendBackend / API workenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions