Browse Source

Update swagger for changePassword

[email protected] 3 years ago
parent
commit
4517e07e11
3 changed files with 251 additions and 31 deletions
  1. 95 11
      server/docs/docs.go
  2. 95 11
      server/docs/swagger.json
  3. 61 9
      server/docs/swagger.yaml

+ 95 - 11
server/docs/docs.go

@@ -1476,9 +1476,7 @@ var doc = `{
                     }
                 ],
                 "responses": {
-                    "200": {
-                        "description": ""
-                    }
+                    "200": {}
                 }
             }
         },
@@ -1511,9 +1509,7 @@ var doc = `{
                     }
                 ],
                 "responses": {
-                    "200": {
-                        "description": ""
-                    }
+                    "200": {}
                 }
             }
         },
@@ -2884,7 +2880,7 @@ var doc = `{
             }
         },
         "/user/changePassword": {
-            "put": {
+            "post": {
                 "security": [
                     {
                         "ApiKeyAuth": []
@@ -2956,6 +2952,33 @@ var doc = `{
                 }
             }
         },
+        "/user/getUserInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "SysUser"
+                ],
+                "summary": "获取用户信息",
+                "responses": {
+                    "200": {
+                        "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
+                        "schema": {
+                            "type": "string"
+                        }
+                    }
+                }
+            }
+        },
         "/user/getUserList": {
             "post": {
                 "security": [
@@ -3024,7 +3047,7 @@ var doc = `{
                 }
             }
         },
-        "/user/setUserAuthority": {
+        "/user/setUserAuthorities": {
             "post": {
                 "security": [
                     {
@@ -3041,6 +3064,44 @@ var doc = `{
                     "SysUser"
                 ],
                 "summary": "设置用户权限",
+                "parameters": [
+                    {
+                        "description": "用户UUID, 角色ID",
+                        "name": "data",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.SetUserAuthorities"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
+                        "schema": {
+                            "type": "string"
+                        }
+                    }
+                }
+            }
+        },
+        "/user/setUserAuthority": {
+            "post": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "SysUser"
+                ],
+                "summary": "更改用户权限",
                 "parameters": [
                     {
                         "description": "用户UUID, 角色ID",
@@ -3838,6 +3899,12 @@ var doc = `{
                 "authorityId": {
                     "type": "string"
                 },
+                "authorityIds": {
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
+                },
                 "headerImg": {
                     "type": "string"
                 },
@@ -3907,10 +3974,21 @@ var doc = `{
                 "authorityId": {
                     "description": "角色ID",
                     "type": "string"
+                }
+            }
+        },
+        "request.SetUserAuthorities": {
+            "type": "object",
+            "properties": {
+                "authorityIds": {
+                    "description": "角色ID",
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
                 },
-                "uuid": {
-                    "description": "用户UUID",
-                    "type": "string"
+                "id": {
+                    "type": "integer"
                 }
             }
         },
@@ -4524,6 +4602,12 @@ var doc = `{
                     "description": "活跃颜色",
                     "type": "string"
                 },
+                "authorities": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/system.SysAuthority"
+                    }
+                },
                 "authority": {
                     "$ref": "#/definitions/system.SysAuthority"
                 },

+ 95 - 11
server/docs/swagger.json

@@ -1460,9 +1460,7 @@
                     }
                 ],
                 "responses": {
-                    "200": {
-                        "description": ""
-                    }
+                    "200": {}
                 }
             }
         },
@@ -1495,9 +1493,7 @@
                     }
                 ],
                 "responses": {
-                    "200": {
-                        "description": ""
-                    }
+                    "200": {}
                 }
             }
         },
@@ -2868,7 +2864,7 @@
             }
         },
         "/user/changePassword": {
-            "put": {
+            "post": {
                 "security": [
                     {
                         "ApiKeyAuth": []
@@ -2940,6 +2936,33 @@
                 }
             }
         },
+        "/user/getUserInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "SysUser"
+                ],
+                "summary": "获取用户信息",
+                "responses": {
+                    "200": {
+                        "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
+                        "schema": {
+                            "type": "string"
+                        }
+                    }
+                }
+            }
+        },
         "/user/getUserList": {
             "post": {
                 "security": [
@@ -3008,7 +3031,7 @@
                 }
             }
         },
-        "/user/setUserAuthority": {
+        "/user/setUserAuthorities": {
             "post": {
                 "security": [
                     {
@@ -3025,6 +3048,44 @@
                     "SysUser"
                 ],
                 "summary": "设置用户权限",
+                "parameters": [
+                    {
+                        "description": "用户UUID, 角色ID",
+                        "name": "data",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/request.SetUserAuthorities"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
+                        "schema": {
+                            "type": "string"
+                        }
+                    }
+                }
+            }
+        },
+        "/user/setUserAuthority": {
+            "post": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "SysUser"
+                ],
+                "summary": "更改用户权限",
                 "parameters": [
                     {
                         "description": "用户UUID, 角色ID",
@@ -3822,6 +3883,12 @@
                 "authorityId": {
                     "type": "string"
                 },
+                "authorityIds": {
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
+                },
                 "headerImg": {
                     "type": "string"
                 },
@@ -3891,10 +3958,21 @@
                 "authorityId": {
                     "description": "角色ID",
                     "type": "string"
+                }
+            }
+        },
+        "request.SetUserAuthorities": {
+            "type": "object",
+            "properties": {
+                "authorityIds": {
+                    "description": "角色ID",
+                    "type": "array",
+                    "items": {
+                        "type": "string"
+                    }
                 },
-                "uuid": {
-                    "description": "用户UUID",
-                    "type": "string"
+                "id": {
+                    "type": "integer"
                 }
             }
         },
@@ -4508,6 +4586,12 @@
                     "description": "活跃颜色",
                     "type": "string"
                 },
+                "authorities": {
+                    "type": "array",
+                    "items": {
+                        "$ref": "#/definitions/system.SysAuthority"
+                    }
+                },
                 "authority": {
                     "$ref": "#/definitions/system.SysAuthority"
                 },

+ 61 - 9
server/docs/swagger.yaml

@@ -514,6 +514,10 @@ definitions:
     properties:
       authorityId:
         type: string
+      authorityIds:
+        items:
+          type: string
+        type: array
       headerImg:
         type: string
       nickName:
@@ -564,9 +568,16 @@ definitions:
       authorityId:
         description: 角色ID
         type: string
-      uuid:
-        description: 用户UUID
-        type: string
+    type: object
+  request.SetUserAuthorities:
+    properties:
+      authorityIds:
+        description: 角色ID
+        items:
+          type: string
+        type: array
+      id:
+        type: integer
     type: object
   request.SysAutoHistory:
     properties:
@@ -1009,6 +1020,10 @@ definitions:
       activeColor:
         description: 活跃颜色
         type: string
+      authorities:
+        items:
+          $ref: '#/definitions/system.SysAuthority'
+        type: array
       authority:
         $ref: '#/definitions/system.SysAuthority'
       authorityId:
@@ -1928,8 +1943,7 @@ paths:
       produces:
       - application/json
       responses:
-        "200":
-          description: ""
+        "200": {}
       security:
       - ApiKeyAuth: []
       summary: 下载模板
@@ -1949,8 +1963,7 @@ paths:
       produces:
       - application/octet-stream
       responses:
-        "200":
-          description: ""
+        "200": {}
       security:
       - ApiKeyAuth: []
       summary: 导出Excel
@@ -2783,7 +2796,7 @@ paths:
       tags:
       - System
   /user/changePassword:
-    put:
+    post:
       parameters:
       - description: 用户名, 原密码, 新密码
         in: body
@@ -2826,6 +2839,22 @@ paths:
       summary: 删除用户
       tags:
       - SysUser
+  /user/getUserInfo:
+    get:
+      consumes:
+      - application/json
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: '{"success":true,"data":{},"msg":"获取成功"}'
+          schema:
+            type: string
+      security:
+      - ApiKeyAuth: []
+      summary: 获取用户信息
+      tags:
+      - SysUser
   /user/getUserList:
     post:
       consumes:
@@ -2868,6 +2897,29 @@ paths:
       summary: 用户注册账号
       tags:
       - SysUser
+  /user/setUserAuthorities:
+    post:
+      consumes:
+      - application/json
+      parameters:
+      - description: 用户UUID, 角色ID
+        in: body
+        name: data
+        required: true
+        schema:
+          $ref: '#/definitions/request.SetUserAuthorities'
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: '{"success":true,"data":{},"msg":"修改成功"}'
+          schema:
+            type: string
+      security:
+      - ApiKeyAuth: []
+      summary: 设置用户权限
+      tags:
+      - SysUser
   /user/setUserAuthority:
     post:
       consumes:
@@ -2888,7 +2940,7 @@ paths:
             type: string
       security:
       - ApiKeyAuth: []
-      summary: 设置用户权限
+      summary: 更改用户权限
       tags:
       - SysUser
   /user/setUserInfo: