swagger.yml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. swagger: "2.0"
  2. info:
  3. title: beego Test API
  4. description: beego has a very cool tools to autogenerate documents for your API
  5. version: 1.0.0
  6. termsOfService: http://beego.me/
  7. contact:
  8. email: astaxie@gmail.com
  9. license:
  10. name: Apache 2.0
  11. url: http://www.apache.org/licenses/LICENSE-2.0.html
  12. basePath: /api
  13. paths:
  14. /home/list:
  15. get:
  16. tags:
  17. - home
  18. description: 首页列表接口
  19. operationId: HomeController.首页列表接口
  20. parameters:
  21. - in: query
  22. name: PageSize
  23. description: 每页数据条数
  24. required: true
  25. type: integer
  26. format: int64
  27. - in: query
  28. name: CurrentIndex
  29. description: 当前页页码,从1开始
  30. required: true
  31. type: integer
  32. format: int64
  33. - in: query
  34. name: ChartPermissionId
  35. description: 品类id,最新传0
  36. required: true
  37. type: integer
  38. format: int64
  39. responses:
  40. "200":
  41. description: ""
  42. schema:
  43. $ref: '#/definitions/models.HomeList'
  44. /permission/all:
  45. get:
  46. tags:
  47. - permission
  48. description: 获取用户详情接口
  49. operationId: ChartPermissionController.获取所有品种
  50. responses:
  51. "200":
  52. description: ""
  53. schema:
  54. $ref: '#/definitions/models.ChartPermissionResp'
  55. /user/detail:
  56. get:
  57. tags:
  58. - user
  59. description: 获取用户详情接口
  60. operationId: UserController.获取用户详情
  61. responses:
  62. "200":
  63. description: ""
  64. schema:
  65. $ref: '#/definitions/models.UserDetail'
  66. /user/login:
  67. post:
  68. tags:
  69. - user
  70. description: 登录接口
  71. operationId: UserController.登录
  72. parameters:
  73. - in: body
  74. name: request
  75. description: type json string
  76. required: true
  77. schema:
  78. $ref: '#/definitions/models.LoginReq'
  79. responses:
  80. "200":
  81. description: ""
  82. schema:
  83. $ref: '#/definitions/models.LoginResp'
  84. /wechat/getEmailCode:
  85. get:
  86. tags:
  87. - wechat
  88. description: 获取邮件验证码接口
  89. operationId: WechatController.获取邮件验证码
  90. parameters:
  91. - in: query
  92. name: Email
  93. description: 邮箱
  94. required: true
  95. type: string
  96. responses:
  97. Ret=200:
  98. description: 获取成功
  99. /wechat/getPhoneNumber:
  100. post:
  101. tags:
  102. - wechat
  103. description: 小程序获取用户绑定手机号接口(需要登录)
  104. operationId: WechatController.小程序获取用户绑定手机号
  105. parameters:
  106. - in: body
  107. name: request
  108. description: type json string
  109. required: true
  110. schema:
  111. $ref: '#/definitions/models.WxGetPhoneNumberReq'
  112. responses:
  113. "200":
  114. description: ""
  115. schema:
  116. $ref: '#/definitions/models.WxGetPhoneNumberResp'
  117. /wechat/getSmsCode:
  118. get:
  119. tags:
  120. - wechat
  121. description: 获取短信验证码接口
  122. operationId: WechatController.获取短信验证码
  123. parameters:
  124. - in: query
  125. name: Mobile
  126. description: 手机号码
  127. required: true
  128. type: string
  129. - in: query
  130. name: AreaNum
  131. description: 地区编码
  132. required: true
  133. type: string
  134. responses:
  135. Ret=200:
  136. description: 获取成功
  137. /wechat/getUserInfo:
  138. post:
  139. tags:
  140. - wechat
  141. description: 小程序获取用户信息接口(需要登录)
  142. operationId: WechatController.小程序获取用户信息
  143. parameters:
  144. - in: body
  145. name: request
  146. description: type json string
  147. required: true
  148. schema:
  149. $ref: '#/definitions/models.WxGetUserInfoReq'
  150. responses:
  151. "200":
  152. description: ""
  153. schema:
  154. $ref: '#/definitions/models.WxGetUserInfoResp'
  155. /wechat/login:
  156. get:
  157. tags:
  158. - wechat
  159. description: 微信登录接口
  160. operationId: WechatCommonController.微信登录接口
  161. parameters:
  162. - in: query
  163. name: Code
  164. description: 微信唯一编码code
  165. required: true
  166. type: string
  167. responses:
  168. "200":
  169. description: ""
  170. schema:
  171. $ref: '#/definitions/models.WxLoginResp'
  172. definitions:
  173. models.ChartPermission:
  174. title: ChartPermission
  175. type: object
  176. properties:
  177. ChartPermissionId:
  178. description: 权限id
  179. type: integer
  180. format: int64
  181. PermissionName:
  182. description: 权限名称
  183. type: string
  184. models.ChartPermissionResp:
  185. title: ChartPermissionResp
  186. type: object
  187. properties:
  188. List:
  189. type: array
  190. items:
  191. $ref: '#/definitions/models.ChartPermission'
  192. models.HomeList:
  193. title: HomeList
  194. type: object
  195. models.LoginReq:
  196. title: LoginReq
  197. type: object
  198. properties:
  199. Email:
  200. description: 邮箱
  201. type: string
  202. LoginType:
  203. description: 登录方式:1:手机,2:邮箱
  204. type: integer
  205. format: int64
  206. Mobile:
  207. description: 手机号
  208. type: string
  209. models.LoginResp:
  210. title: LoginResp
  211. type: object
  212. properties:
  213. Authorization:
  214. description: Token
  215. type: string
  216. CompanyName:
  217. description: 客户名称
  218. type: string
  219. Email:
  220. description: 邮箱
  221. type: string
  222. EndDate:
  223. description: 到期日期
  224. type: string
  225. Headimgurl:
  226. description: 用户头像
  227. type: string
  228. Mobile:
  229. description: 手机号
  230. type: string
  231. ProductName:
  232. description: 客户类型名称
  233. type: string
  234. Status:
  235. description: 状态
  236. type: string
  237. UserId:
  238. description: 用户id
  239. type: integer
  240. format: int64
  241. models.UserDetail:
  242. title: UserDetail
  243. type: object
  244. properties:
  245. CompanyName:
  246. description: 公司名称
  247. type: string
  248. Email:
  249. description: 邮箱
  250. type: string
  251. HasPermission:
  252. description: true:有权限,false:无权限
  253. type: boolean
  254. Headimgurl:
  255. description: 用户头像,最后一个数值代表正方形头像大小(有0、46、64、96、132数值可选,0代表640*640正方形头像),用户没有头像时该项为空
  256. type: string
  257. Mobile:
  258. description: 手机号码
  259. type: string
  260. NickName:
  261. description: 用户昵称
  262. type: string
  263. PermissionName:
  264. description: 拥有权限分类,多个用英文逗号分隔
  265. type: string
  266. RealName:
  267. description: 用户实际名称
  268. type: string
  269. models.WxGetPhoneNumberReq:
  270. title: WxGetPhoneNumberReq
  271. type: object
  272. properties:
  273. EncryptedData:
  274. description: encryptedData
  275. type: string
  276. Iv:
  277. description: iv
  278. type: string
  279. models.WxGetPhoneNumberResp:
  280. title: WxGetPhoneNumberResp
  281. type: object
  282. properties:
  283. Authorization:
  284. description: 登陆凭证,后续接口调用时,带在请求头里面Key:Authorization
  285. type: string
  286. CountryCode:
  287. description: 区号
  288. type: string
  289. PhoneNumber:
  290. description: 用户绑定的手机号(国外手机号会有区号)
  291. type: string
  292. PurePhoneNumber:
  293. description: 没有区号的手机号
  294. type: string
  295. models.WxGetUserInfoReq:
  296. title: WxGetUserInfoReq
  297. type: object
  298. properties:
  299. EncryptedData:
  300. description: encryptedData
  301. type: string
  302. Iv:
  303. description: iv
  304. type: string
  305. RawData:
  306. description: rawData
  307. type: string
  308. Signature:
  309. description: signature
  310. type: string
  311. models.WxGetUserInfoResp:
  312. title: WxGetUserInfoResp
  313. type: object
  314. properties:
  315. Authorization:
  316. description: 登陆凭证,后续接口调用时,带在请求头里面Key:Authorization
  317. type: string
  318. models.WxLoginResp:
  319. title: WxLoginResp
  320. type: object
  321. properties:
  322. Authorization:
  323. type: string
  324. CompanyName:
  325. description: 客户名称
  326. type: string
  327. Email:
  328. description: 邮箱
  329. type: string
  330. EndDate:
  331. description: 到期日期
  332. type: string
  333. FirstLogin:
  334. type: integer
  335. format: int64
  336. Headimgurl:
  337. description: 用户头像
  338. type: string
  339. Mobile:
  340. description: 手机号
  341. type: string
  342. ProductName:
  343. description: 客户类型名称
  344. type: string
  345. Status:
  346. description: 状态
  347. type: string
  348. UserId:
  349. type: integer
  350. format: int64
  351. tags:
  352. - name: user
  353. description: |
  354. 用户
  355. - name: permission
  356. description: |
  357. 品种