Open rafaell-lycan opened 1 year ago
Hi @rafaell-lycan
Thanks the suggestion.
I think you are right that we often create endpoints that output YAML. But in that case, I don't think it's necessary to go to the effort of inclusion in the Hono ecosystem, since we can simply use js-yaml
in that case, in my opinion.
Hi,
I've been playing with Hono (with Node) for a few days at work and we've seen some good performance from it.
After testing
zod-to-openapi
I realized that we could add an additional route with the extension.yml
to output the specs as YAML when needed.e.g.: The example below generates both
/docs
and/docs.yml
routesReason The scenario would be using it with an Online Swagger Editor or simply connecting to your editor of choice.
For performance reasons, it only parses it when the route is triggered:
Example
Also, YAML parsing could be a new Hono helper such as
hono/html
if it becomes useful for more devs.