swagger.yaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. basePath: /v1
  2. definitions:
  3. controller.ResponseBase:
  4. properties:
  5. code:
  6. type: integer
  7. memo:
  8. type: string
  9. type: object
  10. controller.ResponseVerifyPic:
  11. properties:
  12. id:
  13. type: string
  14. pic:
  15. type: string
  16. type: object
  17. controller.UserList:
  18. properties:
  19. code:
  20. type: integer
  21. memo:
  22. type: string
  23. rs:
  24. items:
  25. type: object
  26. type: array
  27. type: object
  28. info:
  29. contact:
  30. email: support@swagger.io
  31. name: API Support
  32. url: http://www.swagger.io/support
  33. description: Video Course框架 API 文档
  34. license:
  35. name: Apache 2.0
  36. url: http://www.apache.org/licenses/LICENSE-2.0.html
  37. termsOfService: http://swagger.io/terms/
  38. title: Video Course框架
  39. version: "1.0"
  40. paths:
  41. /Auth/GenVerifyPic:
  42. post:
  43. consumes:
  44. - application/x-www-form-urlencoded
  45. description: 获取验证图片和验证id
  46. parameters:
  47. - description: 高
  48. in: formData
  49. name: height
  50. required: true
  51. type: string
  52. - description: 宽
  53. in: formData
  54. name: width
  55. required: true
  56. type: string
  57. - description: 噪点数量
  58. in: formData
  59. name: noiseCount
  60. required: true
  61. type: string
  62. - description: 验证码字数
  63. in: formData
  64. name: length
  65. required: true
  66. type: string
  67. - description: 验证码取值范围 比如 1234567890 或者 abcdef等
  68. in: formData
  69. name: source
  70. required: true
  71. type: string
  72. produces:
  73. - application/json
  74. responses:
  75. "200":
  76. description: OK
  77. schema:
  78. $ref: '#/definitions/controller.ResponseVerifyPic'
  79. summary: 获取验证图片
  80. tags:
  81. - Auth
  82. /Auth/GetPhoneVFCode:
  83. post:
  84. consumes:
  85. - application/x-www-form-urlencoded
  86. description: 手机获取验证码
  87. parameters:
  88. - description: 手机号
  89. in: formData
  90. name: phone
  91. required: true
  92. type: string
  93. - description: 验证码类型 1:登录
  94. in: formData
  95. name: codeType
  96. required: true
  97. type: integer
  98. - description: 图形验证码id
  99. in: formData
  100. name: picId
  101. required: true
  102. type: string
  103. - description: 图形验证码
  104. in: formData
  105. name: picCode
  106. required: true
  107. type: string
  108. produces:
  109. - application/json
  110. responses:
  111. "200":
  112. description: OK
  113. schema:
  114. $ref: '#/definitions/controller.ResponseBase'
  115. summary: 手机获取验证码
  116. tags:
  117. - Auth
  118. /Auth/PhoneSignIn:
  119. post:
  120. consumes:
  121. - application/x-www-form-urlencoded
  122. description: 手机验证码登录
  123. parameters:
  124. - description: 手机号
  125. in: formData
  126. name: phone
  127. required: true
  128. type: string
  129. - description: 验证码
  130. in: formData
  131. name: smsCode
  132. required: true
  133. type: integer
  134. produces:
  135. - application/json
  136. responses:
  137. "200":
  138. description: OK
  139. schema:
  140. $ref: '#/definitions/controller.ResponseBase'
  141. summary: 手机验证码登录
  142. tags:
  143. - Auth
  144. /Test/UserAdd:
  145. post:
  146. consumes:
  147. - application/x-www-form-urlencoded
  148. description: 会员用户添加
  149. parameters:
  150. - description: 姓名
  151. in: formData
  152. name: name
  153. required: true
  154. type: string
  155. produces:
  156. - application/json
  157. responses:
  158. "200":
  159. description: OK
  160. schema:
  161. $ref: '#/definitions/controller.ResponseBase'
  162. summary: 会员用户添加
  163. tags:
  164. - Test
  165. /Test/UserListQuery:
  166. post:
  167. consumes:
  168. - application/x-www-form-urlencoded
  169. description: 会员用户查询
  170. produces:
  171. - application/json
  172. responses:
  173. "200":
  174. description: OK
  175. schema:
  176. $ref: '#/definitions/controller.UserList'
  177. summary: 会员用户查询
  178. tags:
  179. - Test
  180. /User/UserSelfQuery:
  181. post:
  182. consumes:
  183. - application/x-www-form-urlencoded
  184. description: 会员信息查询
  185. parameters:
  186. - description: Token
  187. in: formData
  188. name: token
  189. required: true
  190. type: string
  191. produces:
  192. - application/json
  193. responses:
  194. "200":
  195. description: OK
  196. schema:
  197. $ref: '#/definitions/controller.ResponseBase'
  198. summary: 会员信息查询
  199. tags:
  200. - User
  201. securityDefinitions:
  202. ApiKeyAuth:
  203. in: header
  204. name: Authorization
  205. type: apiKey
  206. BasicAuth:
  207. type: basic
  208. OAuth2AccessCode:
  209. authorizationUrl: https://example.com/oauth/authorize
  210. flow: accessCode
  211. scopes:
  212. admin: ' Grants read and write access to administrative information'
  213. tokenUrl: https://example.com/oauth/token
  214. type: oauth2
  215. OAuth2Application:
  216. flow: application
  217. scopes:
  218. admin: ' Grants read and write access to administrative information'
  219. write: ' Grants write access'
  220. tokenUrl: https://example.com/oauth/token
  221. type: oauth2
  222. OAuth2Implicit:
  223. authorizationUrl: https://example.com/oauth/authorize
  224. flow: implicit
  225. scopes:
  226. admin: ' Grants read and write access to administrative information'
  227. write: ' Grants write access'
  228. type: oauth2
  229. OAuth2Password:
  230. flow: password
  231. scopes:
  232. admin: ' Grants read and write access to administrative information'
  233. read: ' Grants read access'
  234. write: ' Grants write access'
  235. tokenUrl: https://example.com/oauth/token
  236. type: oauth2
  237. swagger: "2.0"