Skip to content

yudai-nkt/hono-zod-openapi-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hono-zod-openapi-html

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

Possible contributions to the ecosystem

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's get or other methods Hono already has is Hono instead of OpenAPIHono.
  • OpenAPIHono is not chainable after calling the doc method because it returns void (cf. patch to the package)

License

MIT.

About

Demo API exhibiting how you can provide a comprehensible API documentation using @honojs, @swagger-api, and @Redocly

Topics

Resources

Stars

Watchers

Forks