{ "operationId": "updateUser", "summary": "Update an existing User", "tags": [ "Users" ], "parameters": [ { "in": "path", "name": "userID", "schema": { "anyOf": [ { "type": "integer", "minimum": 1 }, { "type": "string", "pattern": "^me$" } ] }, "required": true, "description": "Numeric ID of the user or 'me' to update yourself", "example": 1 } ], "requestBody": { "description": "User details to update", "required": true, "content": { "application/json": { "schema": "{{schema.UpdateUser}}" } } }, "responses": { "200": { "description": "200 response", "content": { "application/json": { "schema": { "required": [ "result" ], "properties": { "result": { "$ref": "#/components/schemas/UserObject" } } }, "examples": { "default": { "value": { "result": { "id": 1, "name": "Jamie Curnow", "nickname": "James", "email": "jc@jc21.com", "created_on": 1578010100, "modified_on": 1578010110, "roles": [ "admin" ], "gravatar_url": "https://www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?d=mm&r=pg&s=128", "is_disabled": false, "auth": { "id": 1, "type": "password" } } } } } } } }, "400": { "description": "400 response", "content": { "application/json": { "schema": { "required": [ "error" ], "properties": { "result": { "nullable": true }, "error": { "$ref": "#/components/schemas/ErrorObject" } } }, "examples": { "duplicateemail": { "value": { "result": null, "error": { "code": 400, "message": "A user already exists with this email address" } } }, "nodisable": { "value": { "result": null, "error": { "code": 400, "message": "You cannot disable yourself!" } } } } } } } } }