Skip to content

Commit

Permalink
docs: user management
Browse files Browse the repository at this point in the history
  • Loading branch information
superrxan committed Jul 1, 2024
1 parent 47a7eb1 commit c173e60
Show file tree
Hide file tree
Showing 2 changed files with 495 additions and 37 deletions.
274 changes: 253 additions & 21 deletions redocly/api-swagger-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@
},
"example": {
"name": "admin",
"pass": "0000"
"password": "0000"
}
}
}
Expand All @@ -943,15 +943,16 @@
"1": {
"summary": "success",
"value": {
"token": "eyJhbGciOiJ...."
"token": "eyJhbGciOiJ....",
"role": "Administrator"
}
}
}
}
}
},
"500": {
"description": "Password does not match!",
"401": {
"description": "Username or Password incorrect!",
"content": {
"application/json": {
"schema": {
Expand All @@ -965,8 +966,8 @@
"x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719066-run"
}
},
"/api/password": {
"post": {
"/api/users/password/{name}": {
"put": {
"summary": "Change password",
"x-apifox-folder": "NeuronEX/server",
"x-apifox-status": "released",
Expand All @@ -976,17 +977,146 @@
"tags": [
"server"
],
"parameters": [],
"parameters": [
{
"name": "name",
"in": "query",
"description": "username to be deleted",
"required": true,
"example": "test",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PasswordChangeBody"
},
"example": {
"name": "admin",
"old_pass": "0000",
"new_pass": "1111"
"name": "test",
"old_password": "0000",
"new_password": "1111"
}
}
}
},
"responses": {
"200": {
"description": "success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
},
"500": {
"description": "500",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
},
"x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run"
}
},
"/api/users": {
"post": {
"summary": "Creat New User",
"x-apifox-folder": "NeuronEX/server",
"x-apifox-status": "released",
"deprecated": false,
"description": "",
"operationId": "newUserHandler",
"tags": [
"server"
],
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewUserRequestBody"
},
"example": {
"name": "test",
"password": "test",
"role": "Viewer",
"description": "create new user test and set him to viewer"
}
}
}
},
"responses": {
"200": {
"description": "success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
},
"500": {
"description": "500",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
},
"x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run"
}
},
"/api/users/role/{name}": {
"put": {
"summary": "Change role",
"x-apifox-folder": "NeuronEX/server",
"x-apifox-status": "released",
"deprecated": false,
"description": "",
"operationId": "roleChangeHandler",
"tags": [
"server"
],
"parameters": [
{
"name": "name",
"in": "query",
"description": "username to be deleted",
"required": true,
"example": "test",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserRoleChangeBody"
},
"example": {
"name": "test",
"role": "Viewer",
"description": "change user test's role to viewer"
}
}
}
Expand Down Expand Up @@ -1018,6 +1148,56 @@
"x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run"
}
},
"/api/users/{name}": {
"delete": {
"summary": "Delete User",
"x-apifox-folder": "NeuronEX/server",
"x-apifox-status": "released",
"deprecated": false,
"description": "",
"operationId": "deleteUserHandler",
"tags": [
"server"
],
"parameters": [
{
"name": "name",
"in": "query",
"description": "username to be deleted",
"required": true,
"example": "test",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
},
"500": {
"description": "500",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {}
}
}
}
}
},
"x-run-in-apifox": "https://apifox.com/web/project/3198643/apis/api-119719067-run"
}
},
"/api/system": {
"get": {
"summary": "Get system information",
Expand Down Expand Up @@ -4956,8 +5136,7 @@
},
"example": {
"name": "gconfig1",
"node": "modbus-node",
"interval": 10000
"node": "modbus-node"
}
}
}
Expand Down Expand Up @@ -13891,16 +14070,22 @@
"responseData": {
"type": "object",
"required": [
"token"
"token",
"role"
],
"properties": {
"token": {
"type": "string",
"x-go-name": "Token"
},
"role": {
"type": "string",
"x-go-name": "Role"
}
},
"x-apifox-orders": [
"token"
"token",
"role"
],
"x-apifox-folder": "Schemas"
},
Expand All @@ -13924,21 +14109,21 @@
"type": "object",
"required": [
"name",
"pass"
"password"
],
"properties": {
"name": {
"type": "string",
"x-go-name": "Username"
},
"pass": {
"password": {
"type": "string",
"x-go-name": "Password"
}
},
"x-apifox-orders": [
"name",
"pass"
"password"
],
"x-apifox-folder": "Schemas"
},
Expand Down Expand Up @@ -14391,24 +14576,71 @@
"type": "object",
"required": [
"name",
"old_pass",
"new_pass"
"old_password",
"new_password"
],
"properties": {
"name": {
"type": "string",
"x-go-name": "Username"
},
"new_pass": {
"new_password": {
"type": "string",
"x-go-name": "NewPassword"
},
"old_pass": {
"old_password": {
"type": "string",
"x-go-name": "OldPassword"
}
}
},
"NewUserRequestBody": {
"type": "object",
"required": [
"name",
"password",
"role"
],
"properties": {
"name": {
"type": "string",
"x-go-name": "Username"
},
"password": {
"type": "string",
"x-go-name": "Password"
},
"description": {
"type": "string",
"x-go-name": "UserDescription"
},
"role": {
"type": "string",
"x-go-name": "Role"
}
}
},
"UserRoleChangeBody": {
"type": "object",
"required": [
"name",
"role"
],
"properties": {
"name": {
"type": "string",
"x-go-name": "Username"
},
"description": {
"type": "string",
"x-go-name": "UserDescription"
},
"role": {
"type": "string",
"x-go-name": "Role"
}
}
},
"SSOConfigBody": {
"type": "object",
"required": [
Expand Down
Loading

0 comments on commit c173e60

Please sign in to comment.