Overview
There is no formal API contract. Integrators must read source code to understand request/response shapes, error codes, and authentication. An OpenAPI 3.0 spec enables auto-generated client SDKs, Postman collections, and interactive docs.
Endpoints to Document
GET /health
GET /api/v1/prices/:assetCode with optional ?issuer= query param
POST /api/v1/prices/batch
POST /api/v1/webhooks
GET /api/v1/webhooks
DELETE /api/v1/webhooks/:id
POST /api/v1/webhooks/:id/test
GET /api/v1/indexer/status
WS /ws (described as an AsyncAPI or OpenAPI extension)
Deliverables
openapi.yaml at repo root — OpenAPI 3.0.3 format
- Serve the spec at
GET /api-docs/openapi.yaml
- Serve Swagger UI at
GET /api-docs using swagger-ui-express
npm install swagger-ui-express yamljs
Schema Requirements
- All request bodies have Zod-equivalent JSON Schema definitions
- All error responses documented: 400, 401, 404, 422, 429, 500
- Authentication documented:
Bearer scheme in securitySchemes
x-rate-limit extension on rate-limited endpoints
- Examples provided for every endpoint
Acceptance Criteria
Overview
There is no formal API contract. Integrators must read source code to understand request/response shapes, error codes, and authentication. An OpenAPI 3.0 spec enables auto-generated client SDKs, Postman collections, and interactive docs.
Endpoints to Document
GET /healthGET /api/v1/prices/:assetCodewith optional?issuer=query paramPOST /api/v1/prices/batchPOST /api/v1/webhooksGET /api/v1/webhooksDELETE /api/v1/webhooks/:idPOST /api/v1/webhooks/:id/testGET /api/v1/indexer/statusWS /ws(described as an AsyncAPI or OpenAPI extension)Deliverables
openapi.yamlat repo root — OpenAPI 3.0.3 formatGET /api-docs/openapi.yamlGET /api-docsusingswagger-ui-expressSchema Requirements
Bearerscheme insecuritySchemesx-rate-limitextension on rate-limited endpointsAcceptance Criteria
openapi.yamlat repo root with all endpoints@redocly/cli lint openapi.yaml/api-docsin development