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.

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