swagger.yaml 3.9 KB
Newer Older
Mr.奇淼('s avatar
Mr.奇淼( 已提交
1
basePath: /
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
2
definitions:
3 4 5 6 7 8 9 10 11 12
  api.ChangePassWordStutrc:
    properties:
      newPassWord:
        type: string
      passWord:
        type: string
      userName:
        type: string
    type: object
  api.RegistAndLoginStuct:
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
13 14 15 16 17 18
    properties:
      passWord:
        type: string
      userName:
        type: string
    type: object
Mr.奇淼('s avatar
Mr.奇淼( 已提交
19 20 21 22 23 24 25
  modelInterface.PageInfo:
    properties:
      page:
        type: integer
      pageSize:
        type: integer
    type: object
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
26 27
info:
  contact: {}
Mr.奇淼('s avatar
Mr.奇淼( 已提交
28
  description: This is a sample Server pets
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
29
  license: {}
Mr.奇淼('s avatar
Mr.奇淼( 已提交
30 31
  title: Swagger Example API
  version: 0.0.1
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
32
paths:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
33
  /base/login:
34 35
    post:
      parameters:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
36
      - description: 用户登录接口
37 38 39 40
        in: body
        name: data
        required: true
        schema:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
41
          $ref: '#/definitions/api.RegistAndLoginStuct'
42 43 44 45 46
          type: object
      produces:
      - application/json
      responses:
        "200":
Mr.奇淼('s avatar
Mr.奇淼( 已提交
47
          description: '{"success":true,"data":{},"msg":"登陆成功"}'
48 49
          schema:
            type: string
Mr.奇淼('s avatar
Mr.奇淼( 已提交
50
      summary: 用户登录
51
      tags:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
52 53
      - Base
  /base/regist:
54 55
    post:
      parameters:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
56
      - description: 用户注册接口
57 58 59 60 61 62 63 64 65 66
        in: body
        name: data
        required: true
        schema:
          $ref: '#/definitions/api.RegistAndLoginStuct'
          type: object
      produces:
      - application/json
      responses:
        "200":
Mr.奇淼('s avatar
Mr.奇淼( 已提交
67
          description: '{"success":true,"data":{},"msg":"注册成功"}'
68 69
          schema:
            type: string
Mr.奇淼('s avatar
Mr.奇淼( 已提交
70
      summary: 用户注册账号
71
      tags:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
72 73
      - Base
  /menu/getMenu:
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
74 75
    post:
      parameters:
Mr.奇淼('s avatar
Mr.奇淼( 已提交
76
      - description: 可以什么都不填
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
77 78 79 80
        in: body
        name: data
        required: true
        schema:
81
          $ref: '#/definitions/api.RegistAndLoginStuct'
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
82 83
          type: object
      produces:
84
      - application/json
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
85 86
      responses:
        "200":
Mr.奇淼('s avatar
Mr.奇淼( 已提交
87
          description: '{"success":true,"data":{},"msg":"返回成功"}'
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
88 89
          schema:
            type: string
Mr.奇淼('s avatar
Mr.奇淼( 已提交
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
      security:
      - ApiKeyAuth: []
      summary: 获取用户动态路由
      tags:
      - Menu
  /user/changePassWord:
    post:
      parameters:
      - description: 用户修改密码
        in: body
        name: data
        required: true
        schema:
          $ref: '#/definitions/api.ChangePassWordStutrc'
          type: object
      produces:
      - application/json
      responses:
        "200":
          description: '{"success":true,"data":{},"msg":"修改成功"}'
          schema:
            type: string
      security:
      - ApiKeyAuth: []
      summary: 用户修改密码
      tags:
      - User
  /user/getInfoList:
    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: 分页获取用户列表
139 140
      tags:
      - User
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
  /user/uploadHeaderImg:
    post:
      consumes:
      - multipart/form-data
      parameters:
      - description: 用户上传头像
        in: formData
        name: headerImg
        required: true
        type: file
      - description: 用户上传头像
        in: formData
        name: userName
        required: true
        type: string
      produces:
      - application/json
      responses:
        "200":
          description: '{"success":true,"data":{},"msg":"上传成功"}'
          schema:
            type: string
Mr.奇淼('s avatar
Mr.奇淼( 已提交
163 164
      security:
      - ApiKeyAuth: []
165 166 167
      summary: 用户上传头像
      tags:
      - User
Mr.奇淼('s avatar
Mr.奇淼( 已提交
168 169 170 171 172
securityDefinitions:
  ApiKeyAuth:
    in: header
    name: x-token
    type: apiKey
Mr.奇淼('s avatar
swagger  
Mr.奇淼( 已提交
173
swagger: "2.0"