OpenAPI: wire utoipa in presentation #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#2
What to build
Wire utoipa properly in the presentation crate to generate and serve OpenAPI documentation. The api-types crate already has
#[derive(ToSchema)]on all DTOs. The presentation crate needs to merge these into a complete OpenAPI spec and serve it.Add a
GET /api/docsendpoint that serves the OpenAPI JSON. Optionally serve a Swagger UI or Scalar UI atGET /api/docs/ui.Use utoipa's
#[utoipa::path]attribute on handler functions to document each endpoint's request/response types, parameters, and status codes.Acceptance criteria
GET /api/docsreturns a valid OpenAPI 3.x JSON specGET /api/docs/uifor interactive browsingBlocked by
None — can start immediately