mvrilo / go-redoc

go-redoc is an embedded OpenAPI/Swagger documentation ui for Go using ReDoc
MIT License
69 stars 28 forks source link

About Echo implementation #4

Closed luisnquin closed 1 year ago

luisnquin commented 2 years ago

Hi, I really like the project @mvrilo but there's some suggestions that I think could improve the project, between these are:

I don't know if I can open a merge request to make these changes, ready to hear your opinion, me.

mvrilo commented 2 years ago

Hey @luisnquin, sorry the delay and thanks for reaching out!

The problem with use a middleware for just show documentation is that overwrites all other endpoints.

This sounds like a bug actually, looking at the code the middlewares should be calling the Next method in the end so we don't stop other handlers to be called afterwards. I'll push a fix for that this weekend.

Other things that I'm sure that goes well to the package is the json/yaml tags for the structs, more than nothing because normally the HTTP Servers have configuration files and directly set everything in that configuration file sounds good.

Not sure about this. Are you talking about loading from a config file directly into a Redoc struct?

Another improvement could be the favicon.ico implementation, in the same way the openapi.yaml is provided in my case.

Makes sense. Any thoughts on adding a Favicon field on the Redoc struct for this? Could you open a PR for this?

mvrilo commented 2 years ago

I just pushed a v0.1.2 fixing the next handlers issue for gin and echo.