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