Skip to content

Add Swagger request/response examples for all DTOs and endpoints #60

Description

@nanaf6203-bit

Area: Developer Experience
Priority: P2 — Medium

Description

The current Swagger schema shows types but lacks realistic examples. Developers consuming the API need working examples to understand request shapes. Add @ApiProperty({ example }) decorators with realistic values.

Acceptance Criteria

  • Every DTO has example values (walletAddress: GABC123..., amount: 25.5, valid dates)
  • Success responses decorated with @ApiOkResponse with example payload
  • Error responses decorated with @ApiBadRequestResponse, @ApiUnauthorizedResponse, @ApiNotFoundResponse, @ApiTooManyRequestsResponse with example payloads
  • Realistic Stellar addresses, UUIDs, ISO timestamps, decimal amounts
  • Examples render correctly in Swagger UI at /api/docs
  • Document example data conventions in docs/SWAGGER.md

Technical Notes

  • Use OpenAPI example field for primitives
  • Use examples (object) for multiple scenarios per field
  • Keep examples aligned with seeded test data

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignP2Critical prioritydocumentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions