honojs / honox

HonoX - Hono based meta framework
https://hono.dev
MIT License
1.54k stars 42 forks source link

Support `@hono/zod-openapi` type routes #94

Open bruceharrison1984 opened 7 months ago

bruceharrison1984 commented 7 months ago

What is the feature you are proposing?

I found the @hono/zod-openapi to be great for producing OpenApi documentation fairly painlessly. The current HonoX API is very close to what @hono/zod-openapi does.

https://github.com/honojs/middleware/tree/main/packages/swagger-ui#with-openapihono-usage

Is it possible to get the same behavior in HonoX? I know you can declare routes in the "classic" Hono fashion to make use of this, but I was wondering if there is a way to make this a first-class feature of HonoX.

yusukebe commented 7 months ago

Hi @bruceharrison1984

Yeah, @hono/zod-openapi is great and some users are using this in production such as the unkey.

Is it possible to get the same behavior in HonoX? I know you can declare routes in the "classic" Hono fashion to make use of this, but I was wondering if there is a way to make this a first-class feature of HonoX.

I am okay with using the "classic" Hono style. After all, I think "classic" Hono fashion is very useful.

Or if any others have a good idea, we'd like to adopt it, so we can keep this open.