Skip to content

Generate OpenAPI spec for Lens REST endpoints #22

Description

@Miracle656

Background

Lens exposes GET /price/:assetA/:assetB, GET /status, GET /pools, and a GraphQL endpoint. Developers integrating Lens need to know the exact request format, the x402 payment header format, and the response schema. An OpenAPI spec makes this discoverable and enables auto-generated clients.

What to build

Author or generate an OpenAPI 3.0 spec covering all Lens REST endpoints, including the x402 payment header requirement.

Key files

  • src/routes/ — all route handlers
  • openapi.yaml — create at repo root
  • README.md — link to spec

Suggested execution

git checkout -b docs/openapi-spec
  1. Document GET /price/{assetA}/{assetB} — include x402 header in security scheme, describe all response fields
  2. Document GET /status, GET /pools
  3. Add a custom x402 security scheme describing the X-PAYMENT header format
  4. Validate with npx @redocly/cli lint openapi.yaml

Example commit message:
docs: add OpenAPI 3.0 spec for all Lens REST endpoints including x402 auth

Acceptance criteria

  • All REST endpoints covered
  • x402 payment header documented as a security requirement
  • Response schemas include all fields with types
  • Spec passes Redocly lint

Drips Wave · Complexity: Medium · 150 points
Comment below to request assignment. PR must include Closes #[this issue].

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions