Skip to content

go集成showdoc ,postman调取接口自动生成在线文档

License

Notifications You must be signed in to change notification settings

qinaction/goshowdoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goshowdoc

 go get github.com/qinaction/goshowdoc

图文讲解

https://www.yuque.com/huanlema-37udr/poa29o/cegwlr

使用方式

  1. 第一步: 在showdoc文档中获取apikey、apitoken、showdocurl写入配置文件中
  2. 在路由层添加前置拦截获取请求体
  3. 在控制层post请使用goshowdoc.BindJSON()、goshowdoc.ReplyJson()
  4. 通过postman生成文档
  5. 登录showDoc查看文档
  6. 如果指定的showDoc的路径和标题为中文需要通过postman进行转码: postman右键有个EncodeUrlComponent:
  7. 案例查看:test/doc_test.go

参考: https://gitee.com/yanggit123/tool

About

go集成showdoc ,postman调取接口自动生成在线文档

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages