swagger.json 11 KB

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