Skip to content

[Feature] OpenAPI specification and auto-generated docs #23

@Siddhant-K-code

Description

@Siddhant-K-code

Summary

Add an OpenAPI 3.1 spec for all API endpoints and serve interactive docs via Swagger UI.

Motivation

An OpenAPI spec signals production readiness and enables:

  • Auto-generated client SDKs (Python, TypeScript, etc.)
  • Interactive API explorer at /docs
  • Import into Postman, Insomnia, and other tools
  • Accurate documentation that stays in sync with code

Endpoints to document

Method Path Description
POST /v1/dedupe Deduplicate chunks
POST /v1/dedupe/stream SSE streaming dedup
POST /v1/retrieve Query vector DB with dedup
GET /health Health check
GET /metrics Prometheus metrics

Deliverables

  • openapi.yaml at repo root
  • Serve Swagger UI at GET /docs (embed via swaggo/http-swagger or static HTML)
  • Request/response schemas with examples
  • Auth scheme documented (Bearer token)
  • Error response schemas (400, 401, 500)
  • CI check that validates spec against implementation

Acceptance Criteria

  • GET /docs renders interactive API explorer
  • All endpoints have request/response examples
  • Spec validates with swagger-cli validate
  • Can generate a working Python client from the spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions