-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate API in Swagger format #1
Comments
any update from the author about this? it would be a great feature |
Authors are open to contributions :) |
i understand. i don't know swagger well nor do I know go well :-( ATM, I am using goa it works but a total PITA to setup. |
ok. i see the work for RAML. seem you are taking care of a lot of stuff already. |
I'd say read (glancing as appropiate) RAML and OpenAPI specs (can't say which order is best), and check out mulesoft's oas-raml-converter, which is specifically useful for its lost semantics sections. |
Maybe a framework plugin for swaggo/swag would be the way to go ? |
@Scapal Agree that swaggo looks like a promising approach. @keith6014 are you working on it or is this one still pretty fair game? |
Some updates? |
I haven't tried it out myself, but since chi is pretty much fancy net/http, it appears as if Swaggo works. |
we've successfully used swaggo with chi (not via docgen though) |
any news? it's been almost 3 years |
Authors are still open to contributions :) Or.. you can hire us. |
I want to finish the docment generate features, does anyone tell me how to start this work? |
I'm currently using swaggo too, but I dislike the fact that it's comment-based: the documentation can deviate from the real routes and controllers. Generating a swagger from Go code really is a pain, and shouldn't be, as an industry standard... I've built swaglint to try to minimize these differences, but I think it's not enough. The problem with automatic generation is about knowing in advance the types sent, if we want to be 100% swagger compliant. Chi, as a net/http router, cannot know in advance what will be sent to the http.Writer. The best chi can do is listing the routes, methods and path params. I think the problem is too complicated and need a framework (like NestJS), and so doesn't apply to a router like Chi (correct me in I'm wrong). I'm in favor of closing the issue as "wontfix" because it's not in the scope of Chi. |
You could try https://github.com/go-andiamo/chioas |
Swagger/OpenAPI is a very popular format for documenting, and generating clients, for APIs. Has there been any discussions about supporting Swagger generation? I couldn't find any issue for it.
This came out of go-chi/chi#226.
The text was updated successfully, but these errors were encountered: