REST Api documentation like github.com/pressly/chi/docgen?

blov · · 424 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>So i was checking out <a href="https://github.com/pressly/chi/tree/master/docgen">chi&#39;s docgen</a> today and thought the concept was really cool. Actual HTTP documentation generated from code, neat!</p> <p>With that said, it doesn&#39;t appear to support handler docstrings. Are there any cool REST documentation generating tools for Go?</p> <p>Nothing super complex is needed imo, but docstrings would be really nice.</p> <hr/>**评论:**<br/><br/>pkieltyka: <pre><p>hey @throwlikepollock thanks for the comment :) I wrote chi/docgen</p> <p>I believe it does support handler docstrings, its just that the .md representation doesn&#39;t have a good way to visualize it. See <a href="https://github.com/pressly/chi/blob/master/_examples/rest/routes.json" rel="nofollow">https://github.com/pressly/chi/blob/master/_examples/rest/routes.json</a> for raw output, which you could use to generate any kind of visual.</p> <p>The only thing missing, would be to have a nice way to auto-generate the request/response payloads, then its golden</p></pre>throwlikepollock: <pre><p>Weird, i&#39;ll have to experiment more. I generated the rest example that you linked yesterday in markdown and didn&#39;t actually find any of the docstrings in it <em>(i grepped, but perhaps i&#39;m wrong)</em>.</p> <p>Since it sounds like an intended feature i&#39;ll stick with docgen and open a bug report if i&#39;m actually right. Thanks!</p></pre>

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

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