You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

268 lines
6.0 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. basePath: /
  2. definitions:
  3. api.ChangePasswordStutrc:
  4. properties:
  5. newPassword:
  6. type: string
  7. password:
  8. type: string
  9. username:
  10. type: string
  11. type: object
  12. api.CreateApiParams:
  13. properties:
  14. description:
  15. type: string
  16. path:
  17. type: string
  18. type: object
  19. api.CreateAuthorityPatams:
  20. properties:
  21. authorityId:
  22. type: integer
  23. authorityName:
  24. type: string
  25. type: object
  26. api.DeleteApiParams:
  27. type: object
  28. api.DeleteAuthorityPatams:
  29. properties:
  30. authorityId:
  31. type: integer
  32. type: object
  33. api.RegistAndLoginStuct:
  34. properties:
  35. password:
  36. type: string
  37. username:
  38. type: string
  39. type: object
  40. modelInterface.PageInfo:
  41. properties:
  42. page:
  43. type: integer
  44. pageSize:
  45. type: integer
  46. type: object
  47. info:
  48. contact: {}
  49. description: This is a sample Server pets
  50. license: {}
  51. title: Swagger Example API
  52. version: 0.0.1
  53. paths:
  54. /api/createApi:
  55. post:
  56. consumes:
  57. - application/json
  58. parameters:
  59. - description: 创建api
  60. in: body
  61. name: data
  62. required: true
  63. schema:
  64. $ref: '#/definitions/api.CreateApiParams'
  65. type: object
  66. produces:
  67. - application/json
  68. responses:
  69. "200":
  70. description: '{"success":true,"data":{},"msg":"获取成功"}'
  71. schema:
  72. type: string
  73. security:
  74. - ApiKeyAuth: []
  75. summary: 为指定角色创建api
  76. tags:
  77. - Api
  78. /api/deleteApi:
  79. post:
  80. consumes:
  81. - application/json
  82. parameters:
  83. - description: 删除api
  84. in: body
  85. name: data
  86. required: true
  87. schema:
  88. $ref: '#/definitions/api.DeleteApiParams'
  89. type: object
  90. produces:
  91. - application/json
  92. responses:
  93. "200":
  94. description: '{"success":true,"data":{},"msg":"获取成功"}'
  95. schema:
  96. type: string
  97. security:
  98. - ApiKeyAuth: []
  99. summary: 删除指定角色api
  100. tags:
  101. - Api
  102. /authority/createAuthority:
  103. post:
  104. consumes:
  105. - application/json
  106. parameters:
  107. - description: 创建角色
  108. in: body
  109. name: data
  110. required: true
  111. schema:
  112. $ref: '#/definitions/api.CreateAuthorityPatams'
  113. type: object
  114. produces:
  115. - application/json
  116. responses:
  117. "200":
  118. description: '{"success":true,"data":{},"msg":"获取成功"}'
  119. schema:
  120. type: string
  121. security:
  122. - ApiKeyAuth: []
  123. summary: 创建角色
  124. tags:
  125. - authority
  126. /authority/deleteAuthority:
  127. post:
  128. consumes:
  129. - application/json
  130. parameters:
  131. - description: 删除角色
  132. in: body
  133. name: data
  134. required: true
  135. schema:
  136. $ref: '#/definitions/api.DeleteAuthorityPatams'
  137. type: object
  138. produces:
  139. - application/json
  140. responses:
  141. "200":
  142. description: '{"success":true,"data":{},"msg":"获取成功"}'
  143. schema:
  144. type: string
  145. security:
  146. - ApiKeyAuth: []
  147. summary: 删除角色
  148. tags:
  149. - authority
  150. /base/login:
  151. post:
  152. parameters:
  153. - description: 用户登录接口
  154. in: body
  155. name: data
  156. required: true
  157. schema:
  158. $ref: '#/definitions/api.RegistAndLoginStuct'
  159. type: object
  160. produces:
  161. - application/json
  162. responses:
  163. "200":
  164. description: '{"success":true,"data":{},"msg":"登陆成功"}'
  165. schema:
  166. type: string
  167. summary: 用户登录
  168. tags:
  169. - Base
  170. /base/regist:
  171. post:
  172. parameters:
  173. - description: 用户注册接口
  174. in: body
  175. name: data
  176. required: true
  177. schema:
  178. $ref: '#/definitions/api.RegistAndLoginStuct'
  179. type: object
  180. produces:
  181. - application/json
  182. responses:
  183. "200":
  184. description: '{"success":true,"data":{},"msg":"注册成功"}'
  185. schema:
  186. type: string
  187. summary: 用户注册账号
  188. tags:
  189. - Base
  190. /user/changePassword:
  191. post:
  192. parameters:
  193. - description: 用户修改密码
  194. in: body
  195. name: data
  196. required: true
  197. schema:
  198. $ref: '#/definitions/api.ChangePasswordStutrc'
  199. type: object
  200. produces:
  201. - application/json
  202. responses:
  203. "200":
  204. description: '{"success":true,"data":{},"msg":"修改成功"}'
  205. schema:
  206. type: string
  207. security:
  208. - ApiKeyAuth: []
  209. summary: 用户修改密码
  210. tags:
  211. - User
  212. /user/getInfoList:
  213. post:
  214. consumes:
  215. - application/json
  216. parameters:
  217. - description: 分页获取用户列表
  218. in: body
  219. name: data
  220. required: true
  221. schema:
  222. $ref: '#/definitions/modelInterface.PageInfo'
  223. type: object
  224. produces:
  225. - application/json
  226. responses:
  227. "200":
  228. description: '{"success":true,"data":{},"msg":"获取成功"}'
  229. schema:
  230. type: string
  231. security:
  232. - ApiKeyAuth: []
  233. summary: 分页获取用户列表
  234. tags:
  235. - User
  236. /user/uploadHeaderImg:
  237. post:
  238. consumes:
  239. - multipart/form-data
  240. parameters:
  241. - description: 用户上传头像
  242. in: formData
  243. name: headerImg
  244. required: true
  245. type: file
  246. - description: 用户上传头像
  247. in: formData
  248. name: username
  249. required: true
  250. type: string
  251. produces:
  252. - application/json
  253. responses:
  254. "200":
  255. description: '{"success":true,"data":{},"msg":"上传成功"}'
  256. schema:
  257. type: string
  258. security:
  259. - ApiKeyAuth: []
  260. summary: 用户上传头像
  261. tags:
  262. - User
  263. securityDefinitions:
  264. ApiKeyAuth:
  265. in: header
  266. name: x-token
  267. type: apiKey
  268. swagger: "2.0"