swagger.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "Video Course框架 API 文档",
  5. "title": "Video Course框架",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "API Support",
  9. "url": "http://www.swagger.io/support",
  10. "email": "support@swagger.io"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "basePath": "/v1",
  19. "paths": {
  20. "/Auth/GenVerifyPic": {
  21. "post": {
  22. "description": "获取验证图片和验证id",
  23. "consumes": [
  24. "application/x-www-form-urlencoded"
  25. ],
  26. "produces": [
  27. "application/json"
  28. ],
  29. "tags": [
  30. "Auth"
  31. ],
  32. "summary": "获取验证图片",
  33. "parameters": [
  34. {
  35. "type": "string",
  36. "description": "高",
  37. "name": "height",
  38. "in": "formData",
  39. "required": true
  40. },
  41. {
  42. "type": "string",
  43. "description": "宽",
  44. "name": "width",
  45. "in": "formData",
  46. "required": true
  47. },
  48. {
  49. "type": "string",
  50. "description": "噪点数量",
  51. "name": "noiseCount",
  52. "in": "formData",
  53. "required": true
  54. },
  55. {
  56. "type": "string",
  57. "description": "验证码字数",
  58. "name": "length",
  59. "in": "formData",
  60. "required": true
  61. },
  62. {
  63. "type": "string",
  64. "description": "验证码取值范围 比如 1234567890 或者 abcdef等",
  65. "name": "source",
  66. "in": "formData",
  67. "required": true
  68. }
  69. ],
  70. "responses": {
  71. "200": {
  72. "description": "OK",
  73. "schema": {
  74. "$ref": "#/definitions/controller.ResponseVerifyPic"
  75. }
  76. }
  77. }
  78. }
  79. },
  80. "/Auth/GetPhoneVFCode": {
  81. "post": {
  82. "description": "手机获取验证码",
  83. "consumes": [
  84. "application/x-www-form-urlencoded"
  85. ],
  86. "produces": [
  87. "application/json"
  88. ],
  89. "tags": [
  90. "Auth"
  91. ],
  92. "summary": "手机获取验证码",
  93. "parameters": [
  94. {
  95. "type": "string",
  96. "description": "手机号",
  97. "name": "phone",
  98. "in": "formData",
  99. "required": true
  100. },
  101. {
  102. "type": "integer",
  103. "description": "验证码类型 1:登录",
  104. "name": "codeType",
  105. "in": "formData",
  106. "required": true
  107. },
  108. {
  109. "type": "string",
  110. "description": "图形验证码id",
  111. "name": "picId",
  112. "in": "formData",
  113. "required": true
  114. },
  115. {
  116. "type": "string",
  117. "description": "图形验证码",
  118. "name": "picCode",
  119. "in": "formData",
  120. "required": true
  121. }
  122. ],
  123. "responses": {
  124. "200": {
  125. "description": "OK",
  126. "schema": {
  127. "$ref": "#/definitions/controller.ResponseBase"
  128. }
  129. }
  130. }
  131. }
  132. },
  133. "/Auth/PhoneSignIn": {
  134. "post": {
  135. "description": "手机验证码登录",
  136. "consumes": [
  137. "application/x-www-form-urlencoded"
  138. ],
  139. "produces": [
  140. "application/json"
  141. ],
  142. "tags": [
  143. "Auth"
  144. ],
  145. "summary": "手机验证码登录",
  146. "parameters": [
  147. {
  148. "type": "string",
  149. "description": "手机号",
  150. "name": "phone",
  151. "in": "formData",
  152. "required": true
  153. },
  154. {
  155. "type": "integer",
  156. "description": "验证码",
  157. "name": "smsCode",
  158. "in": "formData",
  159. "required": true
  160. }
  161. ],
  162. "responses": {
  163. "200": {
  164. "description": "OK",
  165. "schema": {
  166. "$ref": "#/definitions/controller.ResponseBase"
  167. }
  168. }
  169. }
  170. }
  171. },
  172. "/Test/UserAdd": {
  173. "post": {
  174. "description": "会员用户添加",
  175. "consumes": [
  176. "application/x-www-form-urlencoded"
  177. ],
  178. "produces": [
  179. "application/json"
  180. ],
  181. "tags": [
  182. "Test"
  183. ],
  184. "summary": "会员用户添加",
  185. "parameters": [
  186. {
  187. "type": "string",
  188. "description": "姓名",
  189. "name": "name",
  190. "in": "formData",
  191. "required": true
  192. }
  193. ],
  194. "responses": {
  195. "200": {
  196. "description": "OK",
  197. "schema": {
  198. "$ref": "#/definitions/controller.ResponseBase"
  199. }
  200. }
  201. }
  202. }
  203. },
  204. "/Test/UserListQuery": {
  205. "post": {
  206. "description": "会员用户查询",
  207. "consumes": [
  208. "application/x-www-form-urlencoded"
  209. ],
  210. "produces": [
  211. "application/json"
  212. ],
  213. "tags": [
  214. "Test"
  215. ],
  216. "summary": "会员用户查询",
  217. "responses": {
  218. "200": {
  219. "description": "OK",
  220. "schema": {
  221. "$ref": "#/definitions/controller.UserList"
  222. }
  223. }
  224. }
  225. }
  226. },
  227. "/User/UserSelfQuery": {
  228. "post": {
  229. "description": "会员信息查询",
  230. "consumes": [
  231. "application/x-www-form-urlencoded"
  232. ],
  233. "produces": [
  234. "application/json"
  235. ],
  236. "tags": [
  237. "User"
  238. ],
  239. "summary": "会员信息查询",
  240. "parameters": [
  241. {
  242. "type": "string",
  243. "description": "Token",
  244. "name": "token",
  245. "in": "formData",
  246. "required": true
  247. }
  248. ],
  249. "responses": {
  250. "200": {
  251. "description": "OK",
  252. "schema": {
  253. "$ref": "#/definitions/controller.ResponseBase"
  254. }
  255. }
  256. }
  257. }
  258. }
  259. },
  260. "definitions": {
  261. "controller.ResponseBase": {
  262. "type": "object",
  263. "properties": {
  264. "code": {
  265. "type": "integer"
  266. },
  267. "memo": {
  268. "type": "string"
  269. }
  270. }
  271. },
  272. "controller.ResponseVerifyPic": {
  273. "type": "object",
  274. "properties": {
  275. "id": {
  276. "type": "string"
  277. },
  278. "pic": {
  279. "type": "string"
  280. }
  281. }
  282. },
  283. "controller.UserList": {
  284. "type": "object",
  285. "properties": {
  286. "code": {
  287. "type": "integer"
  288. },
  289. "memo": {
  290. "type": "string"
  291. },
  292. "rs": {
  293. "type": "array",
  294. "items": {
  295. "type": "object"
  296. }
  297. }
  298. }
  299. }
  300. },
  301. "securityDefinitions": {
  302. "ApiKeyAuth": {
  303. "type": "apiKey",
  304. "name": "Authorization",
  305. "in": "header"
  306. },
  307. "BasicAuth": {
  308. "type": "basic"
  309. },
  310. "OAuth2AccessCode": {
  311. "type": "oauth2",
  312. "flow": "accessCode",
  313. "authorizationUrl": "https://example.com/oauth/authorize",
  314. "tokenUrl": "https://example.com/oauth/token",
  315. "scopes": {
  316. "admin": " Grants read and write access to administrative information"
  317. }
  318. },
  319. "OAuth2Application": {
  320. "type": "oauth2",
  321. "flow": "application",
  322. "tokenUrl": "https://example.com/oauth/token",
  323. "scopes": {
  324. "admin": " Grants read and write access to administrative information",
  325. "write": " Grants write access"
  326. }
  327. },
  328. "OAuth2Implicit": {
  329. "type": "oauth2",
  330. "flow": "implicit",
  331. "authorizationUrl": "https://example.com/oauth/authorize",
  332. "scopes": {
  333. "admin": " Grants read and write access to administrative information",
  334. "write": " Grants write access"
  335. }
  336. },
  337. "OAuth2Password": {
  338. "type": "oauth2",
  339. "flow": "password",
  340. "tokenUrl": "https://example.com/oauth/token",
  341. "scopes": {
  342. "admin": " Grants read and write access to administrative information",
  343. "read": " Grants read access",
  344. "write": " Grants write access"
  345. }
  346. }
  347. }
  348. }