Skip to content

Regenerate openapi.json to include /api/v2/streams and current error/auth schemas #243

@greatest0fallt1me

Description

@greatest0fallt1me

Description

openapi.json predates the v2 contract; the README documents /api/v2/streams/* as current with breaking field changes (allowed_actions, created_at, settlement), but the spec does not fully reflect v2, the wallet-auth flow, or the unified error envelope. Bring the OpenAPI 3.1 document in sync with the real route handlers. This is a backend documentation task.

Requirements and Context

  • Document /api/v2/streams (GET/POST) using the toV2Stream shape from app/lib/api-version.ts, including settlement: null semantics.
  • Document the wallet challenge/verify flow (GET/POST /api/auth/wallet) and the bearer-token security scheme.
  • Document the shared error envelope and Deprecation/Sunset headers on v1 paths.
  • Must be secure, tested, and documented
  • Should be efficient and easy to review

Suggested Execution

  1. Fork the repo and create a branch
    git checkout -b task/openapi-v2-sync
  2. Implement changes
    • openapi.json
    • Add a CI/spec-lint or schema test that validates examples against route responses
  3. Test and commit
    • npm test -- app/lib/api-version.test.ts
    • Cover edge cases: v1 vs v2 field diffs, error envelope schema, auth scheme
    • Include test output and notes in the PR

Example commit message

task: sync OpenAPI 3.1 spec with v2 and auth routes

Acceptance Criteria

  • /api/v2/streams documented with v2 field shape and examples
  • Wallet auth flow and bearer scheme documented
  • Error envelope and Sunset headers documented
  • Spec examples validated against actual responses in a test

Guidelines

  • Minimum 90% coverage for any spec-validation code added
  • Clear documentation and inline comments
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programapiAPI endpoint/contract workbackendBackend service workdocumentationDocumentation

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions