Skip to content

Auto-generate OpenAPI examples from Pydantic models #45

Description

@usmanimamu17-create

Problem

docs/API.md is hand-curated and drifts; OpenAPI examples are empty {}.

Why

Auto-generated examples stay in sync with reality for the lifetime of the API.

Outcome

Every Pydantic model has json_schema_extra={"example": ...}. Test enforces completeness.

Acceptance

  • /openapi.json includes example everywhere
  • Test enforces
  • docs/API.md regenerable

Files

  • app/models/outage_dto.py
  • app/models/payment.py
  • tests/test_openapi_examples.py (NEW)

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programarea/apiREST API surface, OpenAPI, pagination, content-negotiation, error responsesarea/docsDocumentation, ADRs, runbooks, threat model, contributor guidespriority/mediumStandard backlog item

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions