swagger.yaml 19 KB

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