<p>So i was checking out <a href="https://github.com/pressly/chi/tree/master/docgen">chi'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'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'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'll have to experiment more. I generated the rest example that you linked yesterday in markdown and didn't actually find any of the docstrings in it <em>(i grepped, but perhaps i'm wrong)</em>.</p>
<p>Since it sounds like an intended feature i'll stick with docgen and open a bug report if i'm actually right. Thanks!</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传