swagger.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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/AddAppHeartRate": {
  165. "post": {
  166. "description": "App心率数据上报",
  167. "consumes": [
  168. "application/x-www-form-urlencoded"
  169. ],
  170. "produces": [
  171. "application/json"
  172. ],
  173. "tags": [
  174. "HrSensors"
  175. ],
  176. "summary": "App心率数据上报",
  177. "parameters": [
  178. {
  179. "type": "string",
  180. "description": "Token",
  181. "name": "token",
  182. "in": "formData",
  183. "required": true
  184. },
  185. {
  186. "type": "integer",
  187. "description": "duId",
  188. "name": "duId",
  189. "in": "formData",
  190. "required": true
  191. },
  192. {
  193. "type": "string",
  194. "description": "sn",
  195. "name": "sn",
  196. "in": "formData",
  197. "required": true
  198. },
  199. {
  200. "type": "integer",
  201. "description": "心率带id",
  202. "name": "hrId",
  203. "in": "formData",
  204. "required": true
  205. },
  206. {
  207. "type": "integer",
  208. "description": "心跳",
  209. "name": "heartRate",
  210. "in": "formData",
  211. "required": true
  212. },
  213. {
  214. "type": "integer",
  215. "description": "时间戳毫秒",
  216. "name": "rcvTime",
  217. "in": "formData",
  218. "required": true
  219. },
  220. {
  221. "type": "integer",
  222. "description": "卡路里",
  223. "name": "calories",
  224. "in": "formData",
  225. "required": true
  226. },
  227. {
  228. "type": "integer",
  229. "description": "运动卡路里",
  230. "name": "pureCalories",
  231. "in": "formData",
  232. "required": true
  233. }
  234. ],
  235. "responses": {
  236. "200": {
  237. "description": "OK",
  238. "schema": {
  239. "$ref": "#/definitions/controller.AddHRRtn"
  240. }
  241. }
  242. }
  243. }
  244. },
  245. "/HrSensors/HrSensorsUpdate": {
  246. "post": {
  247. "description": "心率带信息查询和更新",
  248. "consumes": [
  249. "application/x-www-form-urlencoded"
  250. ],
  251. "produces": [
  252. "application/json"
  253. ],
  254. "tags": [
  255. "HrSensors"
  256. ],
  257. "summary": "心率带信息查询和更新",
  258. "parameters": [
  259. {
  260. "type": "string",
  261. "description": "Token",
  262. "name": "token",
  263. "in": "formData",
  264. "required": true
  265. },
  266. {
  267. "type": "string",
  268. "description": "心率带编号",
  269. "name": "sn",
  270. "in": "formData",
  271. "required": true
  272. }
  273. ],
  274. "responses": {
  275. "200": {
  276. "description": "OK",
  277. "schema": {
  278. "$ref": "#/definitions/controller.ResponseBase"
  279. }
  280. }
  281. }
  282. }
  283. },
  284. "/User/GetDuInfoAndUserInfoByUserMd5": {
  285. "post": {
  286. "description": "查询用户当前显示单元和对应身体信息",
  287. "consumes": [
  288. "application/x-www-form-urlencoded"
  289. ],
  290. "produces": [
  291. "application/json"
  292. ],
  293. "tags": [
  294. "User"
  295. ],
  296. "summary": "查询用户是否正在上课接口",
  297. "parameters": [
  298. {
  299. "type": "string",
  300. "description": "Token",
  301. "name": "token",
  302. "in": "formData",
  303. "required": true
  304. }
  305. ],
  306. "responses": {
  307. "200": {
  308. "description": "OK",
  309. "schema": {
  310. "$ref": "#/definitions/controller.ResponseBase"
  311. }
  312. }
  313. }
  314. }
  315. },
  316. "/User/UserSelfQuery": {
  317. "post": {
  318. "description": "会员自身信息查询",
  319. "consumes": [
  320. "application/x-www-form-urlencoded"
  321. ],
  322. "produces": [
  323. "application/json"
  324. ],
  325. "tags": [
  326. "User"
  327. ],
  328. "summary": "会员自身信息查询",
  329. "parameters": [
  330. {
  331. "type": "string",
  332. "description": "Token",
  333. "name": "token",
  334. "in": "formData",
  335. "required": true
  336. }
  337. ],
  338. "responses": {
  339. "200": {
  340. "description": "OK",
  341. "schema": {
  342. "$ref": "#/definitions/controller.ResponseBase"
  343. }
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "definitions": {
  350. "controller.AddHRRtn": {
  351. "type": "object",
  352. "properties": {
  353. "code": {
  354. "type": "integer"
  355. },
  356. "inClass": {
  357. "type": "integer"
  358. },
  359. "memo": {
  360. "type": "string"
  361. }
  362. }
  363. },
  364. "controller.ResponseBase": {
  365. "type": "object",
  366. "properties": {
  367. "code": {
  368. "type": "integer"
  369. },
  370. "memo": {
  371. "type": "string"
  372. }
  373. }
  374. },
  375. "controller.ResponseVerifyPic": {
  376. "type": "object",
  377. "properties": {
  378. "id": {
  379. "type": "string"
  380. },
  381. "pic": {
  382. "type": "string"
  383. }
  384. }
  385. }
  386. },
  387. "securityDefinitions": {
  388. "ApiKeyAuth": {
  389. "type": "apiKey",
  390. "name": "Authorization",
  391. "in": "header"
  392. },
  393. "BasicAuth": {
  394. "type": "basic"
  395. },
  396. "OAuth2AccessCode": {
  397. "type": "oauth2",
  398. "flow": "accessCode",
  399. "authorizationUrl": "https://example.com/oauth/authorize",
  400. "tokenUrl": "https://example.com/oauth/token",
  401. "scopes": {
  402. "admin": " Grants read and write access to administrative information"
  403. }
  404. },
  405. "OAuth2Application": {
  406. "type": "oauth2",
  407. "flow": "application",
  408. "tokenUrl": "https://example.com/oauth/token",
  409. "scopes": {
  410. "admin": " Grants read and write access to administrative information",
  411. "write": " Grants write access"
  412. }
  413. },
  414. "OAuth2Implicit": {
  415. "type": "oauth2",
  416. "flow": "implicit",
  417. "authorizationUrl": "https://example.com/oauth/authorize",
  418. "scopes": {
  419. "admin": " Grants read and write access to administrative information",
  420. "write": " Grants write access"
  421. }
  422. },
  423. "OAuth2Password": {
  424. "type": "oauth2",
  425. "flow": "password",
  426. "tokenUrl": "https://example.com/oauth/token",
  427. "scopes": {
  428. "admin": " Grants read and write access to administrative information",
  429. "read": " Grants read access",
  430. "write": " Grants write access"
  431. }
  432. }
  433. }
  434. }