is there an REST API docs generator for Golang/Gin?

blov · 2017-05-22 06:00:11 · 824 次点击    
这是一个分享于 2017-05-22 06:00:11 的资源,其中的信息可能已经有所发展或是发生改变。

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:

Maybe go-swagger can help you with that.

irth__:

Thanks

kemitche:

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

irth__:

Okay, I guess that is a better approach. I'll check it out, thanks!


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

824 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传