swagger.yaml 19 KB

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