Skip to content

[Backend] Sync swagger schemas: StreamEvent eventType enum + Stream pause fields #540

Description

@ogazboiz

Telegram: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

backend/src/config/swagger.ts component schemas drift from the real models:

  • StreamEvent.eventType enum lists only [CREATED, TOPPED_UP, WITHDRAWN, CANCELLED, COMPLETED] but the API and DB also emit PAUSED, RESUMED, FEE_COLLECTED (see prisma/schema.prisma and the route enums).
  • The Stream schema omits isPaused, pausedAt, totalPausedDuration, and endTime, all of which exist on the Prisma Stream model and are returned by the API.

Consumers reading the OpenAPI spec get an incomplete contract.

Acceptance criteria

  • Add PAUSED, RESUMED, FEE_COLLECTED to the StreamEvent.eventType enum
  • Add isPaused, pausedAt, totalPausedDuration, endTime to the Stream schema
  • /api-docs.json reflects the additions

Files to touch

  • backend/src/config/swagger.ts

Out of scope

  • The doc-block annotations on individual routes.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasksdocsDocumentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions