swagger.yaml 19 KB

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