swagger.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "对抗训练",
  5. "title": "对抗训练",
  6. "contact": {
  7. "name": "Develoven"
  8. },
  9. "version": "1.0"
  10. },
  11. "paths": {
  12. "/v1/chat/getQuestion": {
  13. "get": {
  14. "description": "查询问题",
  15. "consumes": [
  16. "application/json"
  17. ],
  18. "produces": [
  19. "application/json"
  20. ],
  21. "tags": [
  22. "问答管理"
  23. ],
  24. "summary": "查询问题",
  25. "parameters": [
  26. {
  27. "type": "integer",
  28. "description": "id:问题主键",
  29. "name": "id",
  30. "in": "query"
  31. }
  32. ],
  33. "responses": {
  34. "200": {
  35. "description": "ok",
  36. "schema": {
  37. "type": "string"
  38. }
  39. }
  40. }
  41. }
  42. },
  43. "/v1/device/:mac/stop/collect": {
  44. "get": {
  45. "description": "停止采集",
  46. "consumes": [
  47. "application/json"
  48. ],
  49. "produces": [
  50. "application/json"
  51. ],
  52. "tags": [
  53. "设备管理"
  54. ],
  55. "summary": "停止采集",
  56. "responses": {
  57. "200": {
  58. "description": "ok",
  59. "schema": {
  60. "type": "string"
  61. }
  62. }
  63. }
  64. }
  65. },
  66. "/v1/device/:mac/stop/trans": {
  67. "get": {
  68. "description": "停止传输",
  69. "consumes": [
  70. "application/json"
  71. ],
  72. "produces": [
  73. "application/json"
  74. ],
  75. "tags": [
  76. "设备管理"
  77. ],
  78. "summary": "停止传输",
  79. "responses": {
  80. "200": {
  81. "description": "ok",
  82. "schema": {
  83. "type": "string"
  84. }
  85. }
  86. }
  87. }
  88. },
  89. "/v1/device/connection": {
  90. "get": {
  91. "description": "连接设备",
  92. "consumes": [
  93. "application/json"
  94. ],
  95. "produces": [
  96. "application/json"
  97. ],
  98. "tags": [
  99. "设备管理"
  100. ],
  101. "summary": "连接设备",
  102. "parameters": [
  103. {
  104. "description": "chip:芯片编号,0或1;mac:Mac地址;addrType:地址类型 public/random ",
  105. "name": "device",
  106. "in": "body",
  107. "required": true,
  108. "schema": {
  109. "type": "string"
  110. }
  111. }
  112. ],
  113. "responses": {
  114. "200": {
  115. "description": "ok",
  116. "schema": {
  117. "type": "string"
  118. }
  119. }
  120. }
  121. }
  122. },
  123. "/v1/device/open/notify/": {
  124. "get": {
  125. "description": "开启数据通知",
  126. "consumes": [
  127. "application/json"
  128. ],
  129. "produces": [
  130. "application/json"
  131. ],
  132. "tags": [
  133. "设备管理"
  134. ],
  135. "summary": "开启数据通知",
  136. "responses": {
  137. "200": {
  138. "description": "ok",
  139. "schema": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. }
  145. },
  146. "/v1/device/scan": {
  147. "get": {
  148. "description": "扫描设备",
  149. "consumes": [
  150. "application/json"
  151. ],
  152. "produces": [
  153. "application/json"
  154. ],
  155. "tags": [
  156. "设备管理"
  157. ],
  158. "summary": "扫描设备",
  159. "parameters": [
  160. {
  161. "description": "chip:芯片编号,1或1;filterName:0 脑电 1 心电;filterRssi:信号强度,小于0的整数,字符串格式传输;filterMac:过滤Mac地址,以",
  162. "name": "device",
  163. "in": "body",
  164. "required": true,
  165. "schema": {
  166. "type": "string"
  167. }
  168. }
  169. ],
  170. "responses": {
  171. "200": {
  172. "description": "ok",
  173. "schema": {
  174. "type": "string"
  175. }
  176. }
  177. }
  178. }
  179. },
  180. "/v1/device/write/data/": {
  181. "post": {
  182. "description": "写入数据——发送指令 ,ECG设备开启测试功能",
  183. "consumes": [
  184. "application/json"
  185. ],
  186. "produces": [
  187. "application/json"
  188. ],
  189. "tags": [
  190. "设备管理"
  191. ],
  192. "summary": "写入数据——发送指令",
  193. "parameters": [
  194. {
  195. "description": "mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重",
  196. "name": "mac",
  197. "in": "body",
  198. "required": true,
  199. "schema": {
  200. "type": "string"
  201. }
  202. }
  203. ],
  204. "responses": {
  205. "200": {
  206. "description": "ok",
  207. "schema": {
  208. "type": "string"
  209. }
  210. }
  211. }
  212. }
  213. },
  214. "/v1/user/change/password": {
  215. "post": {
  216. "description": "用户修改密码",
  217. "consumes": [
  218. "application/json"
  219. ],
  220. "produces": [
  221. "application/json"
  222. ],
  223. "tags": [
  224. "用户管理"
  225. ],
  226. "summary": "用户修改密码",
  227. "parameters": [
  228. {
  229. "description": "userName:用户名 password:密码 newPassword:新密码",
  230. "name": "user",
  231. "in": "body",
  232. "required": true,
  233. "schema": {
  234. "type": "string"
  235. }
  236. }
  237. ],
  238. "responses": {
  239. "200": {
  240. "description": "ok",
  241. "schema": {
  242. "type": "string"
  243. }
  244. }
  245. }
  246. }
  247. },
  248. "/v1/user/find": {
  249. "post": {
  250. "description": "用户列表查询",
  251. "consumes": [
  252. "application/json"
  253. ],
  254. "produces": [
  255. "application/json"
  256. ],
  257. "tags": [
  258. "用户管理"
  259. ],
  260. "summary": "用户列表查询",
  261. "parameters": [
  262. {
  263. "description": "role:角色;userName:用户名;pageNum:页数;pageSize:每页记录数",
  264. "name": "user",
  265. "in": "body",
  266. "required": true,
  267. "schema": {
  268. "type": "string"
  269. }
  270. }
  271. ],
  272. "responses": {
  273. "200": {
  274. "description": "ok",
  275. "schema": {
  276. "type": "string"
  277. }
  278. }
  279. }
  280. }
  281. },
  282. "/v1/user/login": {
  283. "post": {
  284. "description": "用户登录",
  285. "consumes": [
  286. "application/json"
  287. ],
  288. "produces": [
  289. "application/json"
  290. ],
  291. "tags": [
  292. "用户管理"
  293. ],
  294. "summary": "用户登录",
  295. "parameters": [
  296. {
  297. "description": "username:编号;password:密码;role:角色;",
  298. "name": "user",
  299. "in": "body",
  300. "required": true,
  301. "schema": {
  302. "type": "string"
  303. }
  304. }
  305. ],
  306. "responses": {
  307. "200": {
  308. "description": "ok",
  309. "schema": {
  310. "type": "string"
  311. }
  312. }
  313. }
  314. }
  315. },
  316. "/v1/user/register": {
  317. "post": {
  318. "description": "用户注册",
  319. "consumes": [
  320. "application/json"
  321. ],
  322. "produces": [
  323. "application/json"
  324. ],
  325. "tags": [
  326. "用户管理"
  327. ],
  328. "summary": "用户注册",
  329. "parameters": [
  330. {
  331. "description": "userName:用户名;password:密码;role:角色",
  332. "name": "user",
  333. "in": "body",
  334. "required": true,
  335. "schema": {
  336. "type": "string"
  337. }
  338. }
  339. ],
  340. "responses": {
  341. "200": {
  342. "description": "ok",
  343. "schema": {
  344. "type": "string"
  345. }
  346. }
  347. }
  348. }
  349. },
  350. "/v1/user/reset": {
  351. "post": {
  352. "description": "管理员重置普通用户密码",
  353. "consumes": [
  354. "application/json"
  355. ],
  356. "produces": [
  357. "application/json"
  358. ],
  359. "tags": [
  360. "用户管理"
  361. ],
  362. "summary": "管理员重置普通用户密码",
  363. "parameters": [
  364. {
  365. "description": "username:管理员编号;usernameInit:被重置用户编号",
  366. "name": "user",
  367. "in": "body",
  368. "required": true,
  369. "schema": {
  370. "type": "string"
  371. }
  372. }
  373. ],
  374. "responses": {
  375. "200": {
  376. "description": "ok",
  377. "schema": {
  378. "type": "string"
  379. }
  380. }
  381. }
  382. }
  383. }
  384. }
  385. }