swagger.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  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": "picCode",
  98. "in": "formData"
  99. },
  100. {
  101. "type": "string",
  102. "description": "手机号",
  103. "name": "phone",
  104. "in": "formData",
  105. "required": true
  106. },
  107. {
  108. "type": "integer",
  109. "description": "验证码类型 1:登录",
  110. "name": "codeType",
  111. "in": "formData",
  112. "required": true
  113. }
  114. ],
  115. "responses": {
  116. "200": {
  117. "description": "OK",
  118. "schema": {
  119. "$ref": "#/definitions/controller.ResponseBase"
  120. }
  121. }
  122. }
  123. }
  124. },
  125. "/Auth/PhoneSignIn": {
  126. "post": {
  127. "description": "手机验证码登录",
  128. "consumes": [
  129. "application/x-www-form-urlencoded"
  130. ],
  131. "produces": [
  132. "application/json"
  133. ],
  134. "tags": [
  135. "Auth"
  136. ],
  137. "summary": "手机验证码登录",
  138. "parameters": [
  139. {
  140. "type": "string",
  141. "description": "手机号",
  142. "name": "phone",
  143. "in": "formData",
  144. "required": true
  145. },
  146. {
  147. "type": "integer",
  148. "description": "验证码",
  149. "name": "smsCode",
  150. "in": "formData",
  151. "required": true
  152. }
  153. ],
  154. "responses": {
  155. "200": {
  156. "description": "OK",
  157. "schema": {
  158. "$ref": "#/definitions/controller.ResponseBase"
  159. }
  160. }
  161. }
  162. }
  163. },
  164. "/HrSensors/HrSensorsUpdate": {
  165. "post": {
  166. "description": "心率带信息查询和更新",
  167. "consumes": [
  168. "application/x-www-form-urlencoded"
  169. ],
  170. "produces": [
  171. "application/json"
  172. ],
  173. "tags": [
  174. "HrSensors"
  175. ],
  176. "summary": "心率带信息查询和更新",
  177. "parameters": [
  178. {
  179. "type": "string",
  180. "description": "Token",
  181. "name": "token",
  182. "in": "formData",
  183. "required": true
  184. },
  185. {
  186. "type": "string",
  187. "description": "心率带编号",
  188. "name": "sn",
  189. "in": "formData",
  190. "required": true
  191. }
  192. ],
  193. "responses": {
  194. "200": {
  195. "description": "OK",
  196. "schema": {
  197. "$ref": "#/definitions/controller.ResponseBase"
  198. }
  199. }
  200. }
  201. }
  202. },
  203. "/User/GetDuInfoAndUserInfoByUserMd5": {
  204. "post": {
  205. "description": "查询用户当前显示单元和对应身体信息",
  206. "consumes": [
  207. "application/x-www-form-urlencoded"
  208. ],
  209. "produces": [
  210. "application/json"
  211. ],
  212. "tags": [
  213. "User"
  214. ],
  215. "summary": "查询用户是否正在上课接口",
  216. "parameters": [
  217. {
  218. "type": "string",
  219. "description": "Token",
  220. "name": "token",
  221. "in": "formData",
  222. "required": true
  223. }
  224. ],
  225. "responses": {
  226. "200": {
  227. "description": "OK",
  228. "schema": {
  229. "$ref": "#/definitions/controller.ResponseBase"
  230. }
  231. }
  232. }
  233. }
  234. },
  235. "/User/UserSelfQuery": {
  236. "post": {
  237. "description": "会员自身信息查询",
  238. "consumes": [
  239. "application/x-www-form-urlencoded"
  240. ],
  241. "produces": [
  242. "application/json"
  243. ],
  244. "tags": [
  245. "User"
  246. ],
  247. "summary": "会员自身信息查询",
  248. "parameters": [
  249. {
  250. "type": "string",
  251. "description": "Token",
  252. "name": "token",
  253. "in": "formData",
  254. "required": true
  255. }
  256. ],
  257. "responses": {
  258. "200": {
  259. "description": "OK",
  260. "schema": {
  261. "$ref": "#/definitions/controller.ResponseBase"
  262. }
  263. }
  264. }
  265. }
  266. }
  267. },
  268. "definitions": {
  269. "controller.ResponseBase": {
  270. "type": "object",
  271. "properties": {
  272. "code": {
  273. "type": "integer"
  274. },
  275. "memo": {
  276. "type": "string"
  277. }
  278. }
  279. },
  280. "controller.ResponseVerifyPic": {
  281. "type": "object",
  282. "properties": {
  283. "id": {
  284. "type": "string"
  285. },
  286. "pic": {
  287. "type": "string"
  288. }
  289. }
  290. }
  291. },
  292. "securityDefinitions": {
  293. "ApiKeyAuth": {
  294. "type": "apiKey",
  295. "name": "Authorization",
  296. "in": "header"
  297. },
  298. "BasicAuth": {
  299. "type": "basic"
  300. },
  301. "OAuth2AccessCode": {
  302. "type": "oauth2",
  303. "flow": "accessCode",
  304. "authorizationUrl": "https://example.com/oauth/authorize",
  305. "tokenUrl": "https://example.com/oauth/token",
  306. "scopes": {
  307. "admin": " Grants read and write access to administrative information"
  308. }
  309. },
  310. "OAuth2Application": {
  311. "type": "oauth2",
  312. "flow": "application",
  313. "tokenUrl": "https://example.com/oauth/token",
  314. "scopes": {
  315. "admin": " Grants read and write access to administrative information",
  316. "write": " Grants write access"
  317. }
  318. },
  319. "OAuth2Implicit": {
  320. "type": "oauth2",
  321. "flow": "implicit",
  322. "authorizationUrl": "https://example.com/oauth/authorize",
  323. "scopes": {
  324. "admin": " Grants read and write access to administrative information",
  325. "write": " Grants write access"
  326. }
  327. },
  328. "OAuth2Password": {
  329. "type": "oauth2",
  330. "flow": "password",
  331. "tokenUrl": "https://example.com/oauth/token",
  332. "scopes": {
  333. "admin": " Grants read and write access to administrative information",
  334. "read": " Grants read access",
  335. "write": " Grants write access"
  336. }
  337. }
  338. }
  339. }