Demo API and its document that integrate the following tech stacks (before adopting them in an actual project).
- Hono: web framework
- Zod: schema validation
- OpenAPI: API spec description
- Swagger UI: document generator
- Redoc: another document generator
Just a self-reminder in no particular order. Also keep in mind that these might be my mistakes.
- Cannot infer the correct type for endpoints that may return several response status (cf. compile errors in
index.tsx
) - Returning a 204 response yields a compile error (cf. compile errors in
index.tsx
) - Return type of
OpenAPIHono
'sget
or other methodsHono
already has isHono
instead ofOpenAPIHono
. OpenAPIHono
is not chainable after calling thedoc
method because it returnsvoid
(cf. patch to the package)
MIT.