swagger.yaml 8.7 KB

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