mirror of
https://github.com/xiaoxinpro/nginx-proxy-manager-zh.git
synced 2025-01-24 05:38:15 -05:00
83 lines
1.7 KiB
JSON
83 lines
1.7 KiB
JSON
{
|
|
"operationId": "createUser",
|
|
"summary": "Create a new User",
|
|
"tags": ["Users"],
|
|
"requestBody": {
|
|
"description": "User to Create",
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": "{{schema.CreateUser}}"
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "201 response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["result"],
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/UserObject"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"default": {
|
|
"value": {
|
|
"result": {
|
|
"id": 1,
|
|
"name": "Jamie Curnow",
|
|
"nickname": "James",
|
|
"email": "jc@jc21.com",
|
|
"created_at": 1578010100000,
|
|
"updated_at": 1578010100000,
|
|
"gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128",
|
|
"is_disabled": false,
|
|
"auth": {
|
|
"$ref": "#/components/schemas/UserAuthObject"
|
|
},
|
|
"capabilities": ["full-admin"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "400 response",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["error"],
|
|
"properties": {
|
|
"result": {
|
|
"type": "object",
|
|
"nullable": true
|
|
},
|
|
"error": {
|
|
"$ref": "#/components/schemas/ErrorObject"
|
|
}
|
|
}
|
|
},
|
|
"examples": {
|
|
"default": {
|
|
"value": {
|
|
"error": {
|
|
"code": 400,
|
|
"message": "An user already exists with this email address"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|