Hi.
I've started working on an app. It has a REST API, I use Gin as my framework.
I was wondering - is there anything like apipie for golang?
Something that would allow me to write docs next to the code and it'd generate a nice html viewer. Like APIPie for ruby.
(Godoc is for golang docs and I want to document an HTTP based API)
Thanks in advance.
EDIT: a REST API*
评论:
gudvinr:
irth__:Maybe go-swagger can help you with that.
kemitche:Thanks
irth__:I'll add my support for go-swagger. Currently using it to ensure that my API-building flow starts with designing the API spec. go-swagger then generates all the boring validation/scaffolding code and I wire up the endpoint to the backend.
Once you've changed your flow to one where you design the swagger/openAPI spec first, there's a half-dozen or more tools that can readily consume the spec you wrote and display it in an easy-to-use and easy-to-play-with webpage, eg swagger-ui
Okay, I guess that is a better approach. I'll check it out, thanks!
