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.

761 lines
17 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
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. apiIds:
  15. items:
  16. type: integer
  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.DeleteAuthorityPatams:
  50. properties:
  51. authorityId:
  52. type: integer
  53. type: object
  54. api.GetAuthorityId:
  55. properties:
  56. authorityId:
  57. type: string
  58. type: object
  59. api.GetById:
  60. properties:
  61. id:
  62. type: number
  63. type: object
  64. api.IdInfo:
  65. properties:
  66. id:
  67. type: number
  68. type: object
  69. api.RegistAndLoginStuct:
  70. properties:
  71. password:
  72. type: string
  73. username:
  74. type: string
  75. type: object
  76. api.SetUserAuth:
  77. properties:
  78. authorityId:
  79. type: string
  80. uuid:
  81. type: string
  82. type: object
  83. dbModel.Api:
  84. properties:
  85. description:
  86. type: string
  87. group:
  88. type: string
  89. path:
  90. type: string
  91. type: object
  92. dbModel.BaseMenu:
  93. properties:
  94. children:
  95. items:
  96. $ref: '#/definitions/dbModel.BaseMenu'
  97. type: array
  98. component:
  99. type: string
  100. hidden:
  101. type: boolean
  102. icon:
  103. type: string
  104. name:
  105. type: string
  106. nickName:
  107. type: string
  108. parentId:
  109. type: string
  110. path:
  111. type: string
  112. title:
  113. type: string
  114. type: object
  115. modelInterface.PageInfo:
  116. properties:
  117. page:
  118. type: integer
  119. pageSize:
  120. type: integer
  121. type: object
  122. info:
  123. contact: {}
  124. description: This is a sample Server pets
  125. license: {}
  126. title: Swagger Example API
  127. version: 0.0.1
  128. paths:
  129. /api/createApi:
  130. post:
  131. consumes:
  132. - application/json
  133. parameters:
  134. - description: 创建api
  135. in: body
  136. name: data
  137. required: true
  138. schema:
  139. $ref: '#/definitions/api.CreateApiParams'
  140. type: object
  141. produces:
  142. - application/json
  143. responses:
  144. "200":
  145. description: '{"success":true,"data":{},"msg":"获取成功"}'
  146. schema:
  147. type: string
  148. security:
  149. - ApiKeyAuth: []
  150. summary: 创建基础api
  151. tags:
  152. - Api
  153. /api/deleteApi:
  154. post:
  155. consumes:
  156. - application/json
  157. parameters:
  158. - description: 删除api
  159. in: body
  160. name: data
  161. required: true
  162. schema:
  163. $ref: '#/definitions/dbModel.Api'
  164. type: object
  165. produces:
  166. - application/json
  167. responses:
  168. "200":
  169. description: '{"success":true,"data":{},"msg":"获取成功"}'
  170. schema:
  171. type: string
  172. security:
  173. - ApiKeyAuth: []
  174. summary: 删除指定api
  175. tags:
  176. - Api
  177. /api/getAllApis:
  178. post:
  179. consumes:
  180. - application/json
  181. produces:
  182. - application/json
  183. responses:
  184. "200":
  185. description: '{"success":true,"data":{},"msg":"获取成功"}'
  186. schema:
  187. type: string
  188. security:
  189. - ApiKeyAuth: []
  190. summary: 获取所有的Api 不分页
  191. tags:
  192. - Api
  193. /api/getApiById:
  194. post:
  195. consumes:
  196. - application/json
  197. parameters:
  198. - description: 分页获取用户列表
  199. in: body
  200. name: data
  201. required: true
  202. schema:
  203. $ref: '#/definitions/modelInterface.PageInfo'
  204. type: object
  205. produces:
  206. - application/json
  207. responses:
  208. "200":
  209. description: '{"success":true,"data":{},"msg":"获取成功"}'
  210. schema:
  211. type: string
  212. security:
  213. - ApiKeyAuth: []
  214. summary: 根据id获取api
  215. tags:
  216. - Api
  217. /api/getApiList:
  218. post:
  219. consumes:
  220. - application/json
  221. parameters:
  222. - description: 分页获取API列表
  223. in: body
  224. name: data
  225. required: true
  226. schema:
  227. $ref: '#/definitions/modelInterface.PageInfo'
  228. type: object
  229. produces:
  230. - application/json
  231. responses:
  232. "200":
  233. description: '{"success":true,"data":{},"msg":"获取成功"}'
  234. schema:
  235. type: string
  236. security:
  237. - ApiKeyAuth: []
  238. summary: 分页获取API列表
  239. tags:
  240. - Api
  241. /api/setAuthAndApi:
  242. post:
  243. consumes:
  244. - application/json
  245. parameters:
  246. - description: 创建api和角色关系
  247. in: body
  248. name: data
  249. required: true
  250. schema:
  251. $ref: '#/definitions/api.AuthAndPathIn'
  252. type: object
  253. produces:
  254. - application/json
  255. responses:
  256. "200":
  257. description: '{"success":true,"data":{},"msg":"获取成功"}'
  258. schema:
  259. type: string
  260. security:
  261. - ApiKeyAuth: []
  262. summary: 创建api和角色关系
  263. tags:
  264. - Api
  265. /api/updataApi:
  266. post:
  267. consumes:
  268. - application/json
  269. parameters:
  270. - description: 创建api
  271. in: body
  272. name: data
  273. required: true
  274. schema:
  275. $ref: '#/definitions/api.CreateApiParams'
  276. type: object
  277. produces:
  278. - application/json
  279. responses:
  280. "200":
  281. description: '{"success":true,"data":{},"msg":"获取成功"}'
  282. schema:
  283. type: string
  284. security:
  285. - ApiKeyAuth: []
  286. summary: 创建基础api
  287. tags:
  288. - Api
  289. /authority/createAuthority:
  290. post:
  291. consumes:
  292. - application/json
  293. parameters:
  294. - description: 创建角色
  295. in: body
  296. name: data
  297. required: true
  298. schema:
  299. $ref: '#/definitions/api.CreateAuthorityPatams'
  300. type: object
  301. produces:
  302. - application/json
  303. responses:
  304. "200":
  305. description: '{"success":true,"data":{},"msg":"获取成功"}'
  306. schema:
  307. type: string
  308. security:
  309. - ApiKeyAuth: []
  310. summary: 创建角色
  311. tags:
  312. - authority
  313. /authority/deleteAuthority:
  314. post:
  315. consumes:
  316. - application/json
  317. parameters:
  318. - description: 删除角色
  319. in: body
  320. name: data
  321. required: true
  322. schema:
  323. $ref: '#/definitions/api.DeleteAuthorityPatams'
  324. type: object
  325. produces:
  326. - application/json
  327. responses:
  328. "200":
  329. description: '{"success":true,"data":{},"msg":"获取成功"}'
  330. schema:
  331. type: string
  332. security:
  333. - ApiKeyAuth: []
  334. summary: 删除角色
  335. tags:
  336. - authority
  337. /authority/getAuthAndApi:
  338. post:
  339. consumes:
  340. - application/json
  341. parameters:
  342. - description: 获取本角色所有有权限的apiId
  343. in: body
  344. name: data
  345. required: true
  346. schema:
  347. $ref: '#/definitions/api.GetAuthorityId'
  348. type: object
  349. produces:
  350. - application/json
  351. responses:
  352. "200":
  353. description: '{"success":true,"data":{},"msg":"获取成功"}'
  354. schema:
  355. type: string
  356. security:
  357. - ApiKeyAuth: []
  358. summary: 获取本角色所有有权限的apiId
  359. tags:
  360. - authority
  361. /authority/getAuthorityList:
  362. post:
  363. consumes:
  364. - application/json
  365. parameters:
  366. - description: 分页获取用户列表
  367. in: body
  368. name: data
  369. required: true
  370. schema:
  371. $ref: '#/definitions/modelInterface.PageInfo'
  372. type: object
  373. produces:
  374. - application/json
  375. responses:
  376. "200":
  377. description: '{"success":true,"data":{},"msg":"获取成功"}'
  378. schema:
  379. type: string
  380. security:
  381. - ApiKeyAuth: []
  382. summary: 分页获取角色列表
  383. tags:
  384. - authority
  385. /base/login:
  386. post:
  387. parameters:
  388. - description: 用户登录接口
  389. in: body
  390. name: data
  391. required: true
  392. schema:
  393. $ref: '#/definitions/api.RegistAndLoginStuct'
  394. type: object
  395. produces:
  396. - application/json
  397. responses:
  398. "200":
  399. description: '{"success":true,"data":{},"msg":"登陆成功"}'
  400. schema:
  401. type: string
  402. summary: 用户登录
  403. tags:
  404. - Base
  405. /base/regist:
  406. post:
  407. parameters:
  408. - description: 用户注册接口
  409. in: body
  410. name: data
  411. required: true
  412. schema:
  413. $ref: '#/definitions/api.RegistAndLoginStuct'
  414. type: object
  415. produces:
  416. - application/json
  417. responses:
  418. "200":
  419. description: '{"success":true,"data":{},"msg":"注册成功"}'
  420. schema:
  421. type: string
  422. summary: 用户注册账号
  423. tags:
  424. - Base
  425. /fileUploadAndDownload/getFileList:
  426. post:
  427. consumes:
  428. - application/json
  429. parameters:
  430. - description: 分页获取文件户列表
  431. in: body
  432. name: data
  433. required: true
  434. schema:
  435. $ref: '#/definitions/modelInterface.PageInfo'
  436. type: object
  437. produces:
  438. - application/json
  439. responses:
  440. "200":
  441. description: '{"success":true,"data":{},"msg":"获取成功"}'
  442. schema:
  443. type: string
  444. security:
  445. - ApiKeyAuth: []
  446. summary: 分页文件列表
  447. tags:
  448. - FileUploadAndDownload
  449. /fileUploadAndDownload/upload:
  450. post:
  451. consumes:
  452. - multipart/form-data
  453. parameters:
  454. - description: 上传文件示例
  455. in: formData
  456. name: file
  457. required: true
  458. type: file
  459. produces:
  460. - application/json
  461. responses:
  462. "200":
  463. description: '{"success":true,"data":{},"msg":"上传成功"}'
  464. schema:
  465. type: string
  466. security:
  467. - ApiKeyAuth: []
  468. summary: 上传文件示例
  469. tags:
  470. - FileUploadAndDownload
  471. /menu/addBaseMenu:
  472. post:
  473. consumes:
  474. - application/json
  475. parameters:
  476. - description: 新增菜单
  477. in: body
  478. name: data
  479. required: true
  480. schema:
  481. $ref: '#/definitions/dbModel.BaseMenu'
  482. type: object
  483. produces:
  484. - application/json
  485. responses:
  486. "200":
  487. description: '{"success":true,"data":{},"msg":"获取成功"}'
  488. schema:
  489. type: string
  490. security:
  491. - ApiKeyAuth: []
  492. summary: 新增菜单
  493. tags:
  494. - menu
  495. /menu/addMenuAuthority:
  496. post:
  497. consumes:
  498. - application/json
  499. parameters:
  500. - description: 增加menu和角色关联关系
  501. in: body
  502. name: data
  503. required: true
  504. schema:
  505. $ref: '#/definitions/api.AuthorityIdInfo'
  506. type: object
  507. produces:
  508. - application/json
  509. responses:
  510. "200":
  511. description: '{"success":true,"data":{},"msg":"获取成功"}'
  512. schema:
  513. type: string
  514. security:
  515. - ApiKeyAuth: []
  516. summary: 获取指定角色menu
  517. tags:
  518. - authorityAndMenu
  519. /menu/deleteBaseMenu:
  520. post:
  521. consumes:
  522. - application/json
  523. parameters:
  524. - description: 删除菜单
  525. in: body
  526. name: data
  527. required: true
  528. schema:
  529. $ref: '#/definitions/api.IdInfo'
  530. type: object
  531. produces:
  532. - application/json
  533. responses:
  534. "200":
  535. description: '{"success":true,"data":{},"msg":"获取成功"}'
  536. schema:
  537. type: string
  538. security:
  539. - ApiKeyAuth: []
  540. summary: 删除菜单
  541. tags:
  542. - menu
  543. /menu/getBaseMenuById:
  544. post:
  545. consumes:
  546. - application/json
  547. parameters:
  548. - description: 根据id获取菜单
  549. in: body
  550. name: data
  551. required: true
  552. schema:
  553. $ref: '#/definitions/api.GetById'
  554. type: object
  555. produces:
  556. - application/json
  557. responses:
  558. "200":
  559. description: '{"success":true,"data":{},"msg":"获取成功"}'
  560. schema:
  561. type: string
  562. security:
  563. - ApiKeyAuth: []
  564. summary: 根据id获取菜单
  565. tags:
  566. - menu
  567. /menu/getBaseMenuTree:
  568. post:
  569. parameters:
  570. - description: 可以什么都不填
  571. in: body
  572. name: data
  573. required: true
  574. schema:
  575. $ref: '#/definitions/api.RegistAndLoginStuct'
  576. type: object
  577. produces:
  578. - application/json
  579. responses:
  580. "200":
  581. description: '{"success":true,"data":{},"msg":"返回成功"}'
  582. schema:
  583. type: string
  584. security:
  585. - ApiKeyAuth: []
  586. summary: 获取用户动态路由
  587. tags:
  588. - authorityAndMenu
  589. /menu/getMenu:
  590. post:
  591. parameters:
  592. - description: 可以什么都不填
  593. in: body
  594. name: data
  595. required: true
  596. schema:
  597. $ref: '#/definitions/api.RegistAndLoginStuct'
  598. type: object
  599. produces:
  600. - application/json
  601. responses:
  602. "200":
  603. description: '{"success":true,"data":{},"msg":"返回成功"}'
  604. schema:
  605. type: string
  606. security:
  607. - ApiKeyAuth: []
  608. summary: 获取用户动态路由
  609. tags:
  610. - authorityAndMenu
  611. /menu/getMenuList:
  612. post:
  613. consumes:
  614. - application/json
  615. parameters:
  616. - description: 分页获取基础menu列表
  617. in: body
  618. name: data
  619. required: true
  620. schema:
  621. $ref: '#/definitions/modelInterface.PageInfo'
  622. type: object
  623. produces:
  624. - application/json
  625. responses:
  626. "200":
  627. description: '{"success":true,"data":{},"msg":"获取成功"}'
  628. schema:
  629. type: string
  630. security:
  631. - ApiKeyAuth: []
  632. summary: 分页获取基础menu列表
  633. tags:
  634. - menu
  635. /menu/updataBaseMen:
  636. post:
  637. consumes:
  638. - application/json
  639. parameters:
  640. - description: 更新菜单
  641. in: body
  642. name: data
  643. required: true
  644. schema:
  645. $ref: '#/definitions/dbModel.BaseMenu'
  646. type: object
  647. produces:
  648. - application/json
  649. responses:
  650. "200":
  651. description: '{"success":true,"data":{},"msg":"获取成功"}'
  652. schema:
  653. type: string
  654. security:
  655. - ApiKeyAuth: []
  656. summary: 更新菜单
  657. tags:
  658. - menu
  659. /user/changePassword:
  660. post:
  661. parameters:
  662. - description: 用户修改密码
  663. in: body
  664. name: data
  665. required: true
  666. schema:
  667. $ref: '#/definitions/api.ChangePasswordStutrc'
  668. type: object
  669. produces:
  670. - application/json
  671. responses:
  672. "200":
  673. description: '{"success":true,"data":{},"msg":"修改成功"}'
  674. schema:
  675. type: string
  676. security:
  677. - ApiKeyAuth: []
  678. summary: 用户修改密码
  679. tags:
  680. - User
  681. /user/getUserList:
  682. post:
  683. consumes:
  684. - application/json
  685. parameters:
  686. - description: 分页获取用户列表
  687. in: body
  688. name: data
  689. required: true
  690. schema:
  691. $ref: '#/definitions/modelInterface.PageInfo'
  692. type: object
  693. produces:
  694. - application/json
  695. responses:
  696. "200":
  697. description: '{"success":true,"data":{},"msg":"获取成功"}'
  698. schema:
  699. type: string
  700. security:
  701. - ApiKeyAuth: []
  702. summary: 分页获取用户列表
  703. tags:
  704. - User
  705. /user/setUserAuthority:
  706. post:
  707. consumes:
  708. - application/json
  709. parameters:
  710. - description: 设置用户权限
  711. in: body
  712. name: data
  713. required: true
  714. schema:
  715. $ref: '#/definitions/api.SetUserAuth'
  716. type: object
  717. produces:
  718. - application/json
  719. responses:
  720. "200":
  721. description: '{"success":true,"data":{},"msg":"修改成功"}'
  722. schema:
  723. type: string
  724. security:
  725. - ApiKeyAuth: []
  726. summary: 设置用户权限
  727. tags:
  728. - User
  729. /user/uploadHeaderImg:
  730. post:
  731. consumes:
  732. - multipart/form-data
  733. parameters:
  734. - description: 用户上传头像
  735. in: formData
  736. name: headerImg
  737. required: true
  738. type: file
  739. - description: 用户上传头像
  740. in: formData
  741. name: username
  742. required: true
  743. type: string
  744. produces:
  745. - application/json
  746. responses:
  747. "200":
  748. description: '{"success":true,"data":{},"msg":"上传成功"}'
  749. schema:
  750. type: string
  751. security:
  752. - ApiKeyAuth: []
  753. summary: 用户上传头像
  754. tags:
  755. - User
  756. securityDefinitions:
  757. ApiKeyAuth:
  758. in: header
  759. name: x-token
  760. type: apiKey
  761. swagger: "2.0"