How to integrate zod-openapi from Hono.js for OpenAPI schema generation? #23
Replies: 2 comments
-
|
Thank you for your interest in our project! Current SituationThe challenge is that Hono's zod-openapi implementation relies on Hono's specific TypeSafe mechanism, while AsenaJS uses its own decorator-based architecture one layer above. This makes direct integration challenging and we do not have any integration. Possible Approaches
Future PlansWe do have plans to implement OpenAPI integration in the future but i don't decide how to do it. Possibly with Zod validation, but it's not currently a priority in our roadmap. RecommendationFor now, the most practical approach would be to create a custom tool that analyzes AsenaJS's decorator metadata to generate OpenAPI schemas. This could be developed as a separate utility that works alongside your AsenaJS application(this is up to you). We welcome contributions in this area! If you develop a solution for OpenAPI integration, we'd be very grateful for a PR. Community contributions like this help improve the framework for everyone. |
Beta Was this translation helpful? Give feedback.
-
|
openapi ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Thank you for your amazing work!
I'm using @hono/zod-openapi to define routes and generate OpenAPI 3.1-compliant documentation in Hono.js. It provides a powerful integration with zod schemas, supports createRoute(), and outputs a fully structured OpenAPI schema including tags, content types, and response schemas.
I'm wondering:
Is there a recommended way to integrate zod-openapi with AsenaJS?
Or perhaps native support is planned for OpenAPI generation via Zod?
Would love to know how you'd recommend approaching this with Asena.
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions