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.

538 lines
12 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
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.AddMenuAuthorityInfo:
  4. properties:
  5. authorityId:
  6. type: string
  7. menus:
  8. items:
  9. $ref: '#/definitions/dbModel.BaseMenu'
  10. type: array
  11. type: object
  12. api.AuthAndPathIn:
  13. properties:
  14. apis:
  15. items:
  16. $ref: '#/definitions/dbModel.Api'
  17. type: array
  18. authorityId:
  19. type: string
  20. type: object
  21. api.AuthorityIdInfo:
  22. properties:
  23. authorityId:
  24. type: string
  25. type: object
  26. api.ChangePasswordStutrc:
  27. properties:
  28. newPassword:
  29. type: string
  30. password:
  31. type: string
  32. username:
  33. type: string
  34. type: object
  35. api.CreateApiParams:
  36. properties:
  37. description:
  38. type: string
  39. path:
  40. type: string
  41. type: object
  42. api.CreateAuthorityPatams:
  43. properties:
  44. authorityId:
  45. type: string
  46. authorityName:
  47. type: string
  48. type: object
  49. api.DeleteApiParams:
  50. type: object
  51. api.DeleteAuthorityPatams:
  52. properties:
  53. authorityId:
  54. type: integer
  55. type: object
  56. api.IdInfo:
  57. properties:
  58. id:
  59. type: number
  60. type: object
  61. api.RegistAndLoginStuct:
  62. properties:
  63. password:
  64. type: string
  65. username:
  66. type: string
  67. type: object
  68. dbModel.Api:
  69. properties:
  70. description:
  71. type: string
  72. path:
  73. type: string
  74. type: object
  75. dbModel.BaseMenu:
  76. properties:
  77. children:
  78. items:
  79. $ref: '#/definitions/dbModel.BaseMenu'
  80. type: array
  81. component:
  82. type: string
  83. hidden:
  84. type: boolean
  85. icon:
  86. type: string
  87. name:
  88. type: string
  89. nickName:
  90. type: string
  91. parentId:
  92. type: string
  93. path:
  94. type: string
  95. title:
  96. type: string
  97. type: object
  98. modelInterface.PageInfo:
  99. properties:
  100. page:
  101. type: integer
  102. pageSize:
  103. type: integer
  104. type: object
  105. info:
  106. contact: {}
  107. description: This is a sample Server pets
  108. license: {}
  109. title: Swagger Example API
  110. version: 0.0.1
  111. paths:
  112. /api/createApi:
  113. post:
  114. consumes:
  115. - application/json
  116. parameters:
  117. - description: 创建api
  118. in: body
  119. name: data
  120. required: true
  121. schema:
  122. $ref: '#/definitions/api.CreateApiParams'
  123. type: object
  124. produces:
  125. - application/json
  126. responses:
  127. "200":
  128. description: '{"success":true,"data":{},"msg":"获取成功"}'
  129. schema:
  130. type: string
  131. security:
  132. - ApiKeyAuth: []
  133. summary: 为指定角色创建api
  134. tags:
  135. - Api
  136. /api/deleteApi:
  137. post:
  138. consumes:
  139. - application/json
  140. parameters:
  141. - description: 删除api
  142. in: body
  143. name: data
  144. required: true
  145. schema:
  146. $ref: '#/definitions/api.DeleteApiParams'
  147. type: object
  148. produces:
  149. - application/json
  150. responses:
  151. "200":
  152. description: '{"success":true,"data":{},"msg":"获取成功"}'
  153. schema:
  154. type: string
  155. security:
  156. - ApiKeyAuth: []
  157. summary: 删除指定角色api
  158. tags:
  159. - Api
  160. /api/getApiList:
  161. post:
  162. consumes:
  163. - application/json
  164. parameters:
  165. - description: 分页获取用户列表
  166. in: body
  167. name: data
  168. required: true
  169. schema:
  170. $ref: '#/definitions/modelInterface.PageInfo'
  171. type: object
  172. produces:
  173. - application/json
  174. responses:
  175. "200":
  176. description: '{"success":true,"data":{},"msg":"获取成功"}'
  177. schema:
  178. type: string
  179. security:
  180. - ApiKeyAuth: []
  181. summary: 分页获取角色列表
  182. tags:
  183. - api
  184. /api/setAuthAndPath:
  185. post:
  186. consumes:
  187. - application/json
  188. parameters:
  189. - description: 创建api和角色关系
  190. in: body
  191. name: data
  192. required: true
  193. schema:
  194. $ref: '#/definitions/api.AuthAndPathIn'
  195. type: object
  196. produces:
  197. - application/json
  198. responses:
  199. "200":
  200. description: '{"success":true,"data":{},"msg":"获取成功"}'
  201. schema:
  202. type: string
  203. security:
  204. - ApiKeyAuth: []
  205. summary: 创建api和角色关系
  206. tags:
  207. - Api
  208. /authority/createAuthority:
  209. post:
  210. consumes:
  211. - application/json
  212. parameters:
  213. - description: 创建角色
  214. in: body
  215. name: data
  216. required: true
  217. schema:
  218. $ref: '#/definitions/api.CreateAuthorityPatams'
  219. type: object
  220. produces:
  221. - application/json
  222. responses:
  223. "200":
  224. description: '{"success":true,"data":{},"msg":"获取成功"}'
  225. schema:
  226. type: string
  227. security:
  228. - ApiKeyAuth: []
  229. summary: 创建角色
  230. tags:
  231. - authority
  232. /authority/deleteAuthority:
  233. post:
  234. consumes:
  235. - application/json
  236. parameters:
  237. - description: 删除角色
  238. in: body
  239. name: data
  240. required: true
  241. schema:
  242. $ref: '#/definitions/api.DeleteAuthorityPatams'
  243. type: object
  244. produces:
  245. - application/json
  246. responses:
  247. "200":
  248. description: '{"success":true,"data":{},"msg":"获取成功"}'
  249. schema:
  250. type: string
  251. security:
  252. - ApiKeyAuth: []
  253. summary: 删除角色
  254. tags:
  255. - authority
  256. /authority/getAuthorityList:
  257. post:
  258. consumes:
  259. - application/json
  260. parameters:
  261. - description: 分页获取用户列表
  262. in: body
  263. name: data
  264. required: true
  265. schema:
  266. $ref: '#/definitions/modelInterface.PageInfo'
  267. type: object
  268. produces:
  269. - application/json
  270. responses:
  271. "200":
  272. description: '{"success":true,"data":{},"msg":"获取成功"}'
  273. schema:
  274. type: string
  275. security:
  276. - ApiKeyAuth: []
  277. summary: 分页获取角色列表
  278. tags:
  279. - authority
  280. /base/login:
  281. post:
  282. parameters:
  283. - description: 用户登录接口
  284. in: body
  285. name: data
  286. required: true
  287. schema:
  288. $ref: '#/definitions/api.RegistAndLoginStuct'
  289. type: object
  290. produces:
  291. - application/json
  292. responses:
  293. "200":
  294. description: '{"success":true,"data":{},"msg":"登陆成功"}'
  295. schema:
  296. type: string
  297. summary: 用户登录
  298. tags:
  299. - Base
  300. /base/regist:
  301. post:
  302. parameters:
  303. - description: 用户注册接口
  304. in: body
  305. name: data
  306. required: true
  307. schema:
  308. $ref: '#/definitions/api.RegistAndLoginStuct'
  309. type: object
  310. produces:
  311. - application/json
  312. responses:
  313. "200":
  314. description: '{"success":true,"data":{},"msg":"注册成功"}'
  315. schema:
  316. type: string
  317. summary: 用户注册账号
  318. tags:
  319. - Base
  320. /menu/addBaseMenu:
  321. post:
  322. consumes:
  323. - application/json
  324. parameters:
  325. - description: 分页获取基础menu列表
  326. in: body
  327. name: data
  328. required: true
  329. schema:
  330. $ref: '#/definitions/modelInterface.PageInfo'
  331. type: object
  332. produces:
  333. - application/json
  334. responses:
  335. "200":
  336. description: '{"success":true,"data":{},"msg":"获取成功"}'
  337. schema:
  338. type: string
  339. security:
  340. - ApiKeyAuth: []
  341. summary: 分页获取基础menu列表
  342. tags:
  343. - menu
  344. /menu/addMenuAuthority:
  345. post:
  346. consumes:
  347. - application/json
  348. parameters:
  349. - description: 增加menu和角色关联关系
  350. in: body
  351. name: data
  352. required: true
  353. schema:
  354. $ref: '#/definitions/api.AuthorityIdInfo'
  355. type: object
  356. produces:
  357. - application/json
  358. responses:
  359. "200":
  360. description: '{"success":true,"data":{},"msg":"获取成功"}'
  361. schema:
  362. type: string
  363. security:
  364. - ApiKeyAuth: []
  365. summary: 获取指定角色menu
  366. tags:
  367. - authorityAndMenu
  368. /menu/deleteBaseMenu:
  369. post:
  370. consumes:
  371. - application/json
  372. parameters:
  373. - description: 删除菜单
  374. in: body
  375. name: data
  376. required: true
  377. schema:
  378. $ref: '#/definitions/api.IdInfo'
  379. type: object
  380. produces:
  381. - application/json
  382. responses:
  383. "200":
  384. description: '{"success":true,"data":{},"msg":"获取成功"}'
  385. schema:
  386. type: string
  387. security:
  388. - ApiKeyAuth: []
  389. summary: 获取指定角色menu
  390. tags:
  391. - menu
  392. /menu/getBaseMenuTree:
  393. post:
  394. parameters:
  395. - description: 可以什么都不填
  396. in: body
  397. name: data
  398. required: true
  399. schema:
  400. $ref: '#/definitions/api.RegistAndLoginStuct'
  401. type: object
  402. produces:
  403. - application/json
  404. responses:
  405. "200":
  406. description: '{"success":true,"data":{},"msg":"返回成功"}'
  407. schema:
  408. type: string
  409. security:
  410. - ApiKeyAuth: []
  411. summary: 获取用户动态路由
  412. tags:
  413. - authorityAndMenu
  414. /menu/getMenu:
  415. post:
  416. parameters:
  417. - description: 可以什么都不填
  418. in: body
  419. name: data
  420. required: true
  421. schema:
  422. $ref: '#/definitions/api.RegistAndLoginStuct'
  423. type: object
  424. produces:
  425. - application/json
  426. responses:
  427. "200":
  428. description: '{"success":true,"data":{},"msg":"返回成功"}'
  429. schema:
  430. type: string
  431. security:
  432. - ApiKeyAuth: []
  433. summary: 获取用户动态路由
  434. tags:
  435. - authorityAndMenu
  436. /menu/getMenuList:
  437. post:
  438. consumes:
  439. - application/json
  440. parameters:
  441. - description: 分页获取基础menu列表
  442. in: body
  443. name: data
  444. required: true
  445. schema:
  446. $ref: '#/definitions/modelInterface.PageInfo'
  447. type: object
  448. produces:
  449. - application/json
  450. responses:
  451. "200":
  452. description: '{"success":true,"data":{},"msg":"获取成功"}'
  453. schema:
  454. type: string
  455. security:
  456. - ApiKeyAuth: []
  457. summary: 分页获取基础menu列表
  458. tags:
  459. - menu
  460. /user/changePassword:
  461. post:
  462. parameters:
  463. - description: 用户修改密码
  464. in: body
  465. name: data
  466. required: true
  467. schema:
  468. $ref: '#/definitions/api.ChangePasswordStutrc'
  469. type: object
  470. produces:
  471. - application/json
  472. responses:
  473. "200":
  474. description: '{"success":true,"data":{},"msg":"修改成功"}'
  475. schema:
  476. type: string
  477. security:
  478. - ApiKeyAuth: []
  479. summary: 用户修改密码
  480. tags:
  481. - User
  482. /user/getInfoList:
  483. post:
  484. consumes:
  485. - application/json
  486. parameters:
  487. - description: 分页获取用户列表
  488. in: body
  489. name: data
  490. required: true
  491. schema:
  492. $ref: '#/definitions/modelInterface.PageInfo'
  493. type: object
  494. produces:
  495. - application/json
  496. responses:
  497. "200":
  498. description: '{"success":true,"data":{},"msg":"获取成功"}'
  499. schema:
  500. type: string
  501. security:
  502. - ApiKeyAuth: []
  503. summary: 分页获取用户列表
  504. tags:
  505. - User
  506. /user/uploadHeaderImg:
  507. post:
  508. consumes:
  509. - multipart/form-data
  510. parameters:
  511. - description: 用户上传头像
  512. in: formData
  513. name: headerImg
  514. required: true
  515. type: file
  516. - description: 用户上传头像
  517. in: formData
  518. name: username
  519. required: true
  520. type: string
  521. produces:
  522. - application/json
  523. responses:
  524. "200":
  525. description: '{"success":true,"data":{},"msg":"上传成功"}'
  526. schema:
  527. type: string
  528. security:
  529. - ApiKeyAuth: []
  530. summary: 用户上传头像
  531. tags:
  532. - User
  533. securityDefinitions:
  534. ApiKeyAuth:
  535. in: header
  536. name: x-token
  537. type: apiKey
  538. swagger: "2.0"