swagger.yaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. info:
  2. contact:
  3. name: Develoven
  4. description: 对抗训练
  5. title: 对抗训练
  6. version: "1.0"
  7. paths:
  8. /v1/chat/getQuestion:
  9. get:
  10. consumes:
  11. - application/json
  12. description: 查询问题
  13. parameters:
  14. - description: id:问题主键
  15. in: query
  16. name: id
  17. type: integer
  18. produces:
  19. - application/json
  20. responses:
  21. "200":
  22. description: ok
  23. schema:
  24. type: string
  25. summary: 查询问题
  26. tags:
  27. - 问答管理
  28. /v1/device/:mac/stop/collect:
  29. get:
  30. consumes:
  31. - application/json
  32. description: 停止采集
  33. produces:
  34. - application/json
  35. responses:
  36. "200":
  37. description: ok
  38. schema:
  39. type: string
  40. summary: 停止采集
  41. tags:
  42. - 设备管理
  43. /v1/device/:mac/stop/trans:
  44. get:
  45. consumes:
  46. - application/json
  47. description: 停止传输
  48. produces:
  49. - application/json
  50. responses:
  51. "200":
  52. description: ok
  53. schema:
  54. type: string
  55. summary: 停止传输
  56. tags:
  57. - 设备管理
  58. /v1/device/connection:
  59. get:
  60. consumes:
  61. - application/json
  62. description: 连接设备
  63. parameters:
  64. - description: 'chip:芯片编号,0或1;mac:Mac地址;addrType:地址类型 public/random '
  65. in: body
  66. name: device
  67. required: true
  68. schema:
  69. type: string
  70. produces:
  71. - application/json
  72. responses:
  73. "200":
  74. description: ok
  75. schema:
  76. type: string
  77. summary: 连接设备
  78. tags:
  79. - 设备管理
  80. /v1/device/open/notify/:
  81. get:
  82. consumes:
  83. - application/json
  84. description: 开启数据通知
  85. produces:
  86. - application/json
  87. responses:
  88. "200":
  89. description: ok
  90. schema:
  91. type: string
  92. summary: 开启数据通知
  93. tags:
  94. - 设备管理
  95. /v1/device/scan:
  96. get:
  97. consumes:
  98. - application/json
  99. description: 扫描设备
  100. parameters:
  101. - description: chip:芯片编号,1或1;filterName:0 脑电 1 心电;filterRssi:信号强度,小于0的整数,字符串格式传输;filterMac:过滤Mac地址,以
  102. in: body
  103. name: device
  104. required: true
  105. schema:
  106. type: string
  107. produces:
  108. - application/json
  109. responses:
  110. "200":
  111. description: ok
  112. schema:
  113. type: string
  114. summary: 扫描设备
  115. tags:
  116. - 设备管理
  117. /v1/device/write/data/:
  118. post:
  119. consumes:
  120. - application/json
  121. description: 写入数据——发送指令 ,ECG设备开启测试功能
  122. parameters:
  123. - description: mac:设备MAC地址 userName:用户姓名 gender:性别 age:年龄 height:身高 weight:体重
  124. in: body
  125. name: mac
  126. required: true
  127. schema:
  128. type: string
  129. produces:
  130. - application/json
  131. responses:
  132. "200":
  133. description: ok
  134. schema:
  135. type: string
  136. summary: 写入数据——发送指令
  137. tags:
  138. - 设备管理
  139. /v1/user/change/password:
  140. post:
  141. consumes:
  142. - application/json
  143. description: 用户修改密码
  144. parameters:
  145. - description: userName:用户名 password:密码 newPassword:新密码
  146. in: body
  147. name: user
  148. required: true
  149. schema:
  150. type: string
  151. produces:
  152. - application/json
  153. responses:
  154. "200":
  155. description: ok
  156. schema:
  157. type: string
  158. summary: 用户修改密码
  159. tags:
  160. - 用户管理
  161. /v1/user/find:
  162. post:
  163. consumes:
  164. - application/json
  165. description: 用户列表查询
  166. parameters:
  167. - description: role:角色;userName:用户名;pageNum:页数;pageSize:每页记录数
  168. in: body
  169. name: user
  170. required: true
  171. schema:
  172. type: string
  173. produces:
  174. - application/json
  175. responses:
  176. "200":
  177. description: ok
  178. schema:
  179. type: string
  180. summary: 用户列表查询
  181. tags:
  182. - 用户管理
  183. /v1/user/login:
  184. post:
  185. consumes:
  186. - application/json
  187. description: 用户登录
  188. parameters:
  189. - description: username:编号;password:密码;role:角色;
  190. in: body
  191. name: user
  192. required: true
  193. schema:
  194. type: string
  195. produces:
  196. - application/json
  197. responses:
  198. "200":
  199. description: ok
  200. schema:
  201. type: string
  202. summary: 用户登录
  203. tags:
  204. - 用户管理
  205. /v1/user/register:
  206. post:
  207. consumes:
  208. - application/json
  209. description: 用户注册
  210. parameters:
  211. - description: userName:用户名;password:密码;role:角色
  212. in: body
  213. name: user
  214. required: true
  215. schema:
  216. type: string
  217. produces:
  218. - application/json
  219. responses:
  220. "200":
  221. description: ok
  222. schema:
  223. type: string
  224. summary: 用户注册
  225. tags:
  226. - 用户管理
  227. /v1/user/reset:
  228. post:
  229. consumes:
  230. - application/json
  231. description: 管理员重置普通用户密码
  232. parameters:
  233. - description: username:管理员编号;usernameInit:被重置用户编号
  234. in: body
  235. name: user
  236. required: true
  237. schema:
  238. type: string
  239. produces:
  240. - application/json
  241. responses:
  242. "200":
  243. description: ok
  244. schema:
  245. type: string
  246. summary: 管理员重置普通用户密码
  247. tags:
  248. - 用户管理
  249. swagger: "2.0"