| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- {
- "operationId": "updateUser",
- "summary": "Update a User",
- "tags": ["Users"],
- "security": [
- {
- "BearerAuth": ["users"]
- }
- ],
- "parameters": [
- {
- "in": "path",
- "name": "userID",
- "schema": {
- "oneOf": [
- {
- "type": "string",
- "pattern": "^me$"
- },
- {
- "type": "integer",
- "minimum": 1
- }
- ]
- },
- "required": true,
- "description": "User ID or 'me' for yourself",
- "example": 2
- }
- ],
- "requestBody": {
- "description": "User Payload",
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "additionalProperties": false,
- "minProperties": 1,
- "properties": {
- "name": {
- "$ref": "../../../components/user-object.json#/properties/name"
- },
- "nickname": {
- "$ref": "../../../components/user-object.json#/properties/nickname"
- },
- "email": {
- "$ref": "../../../components/user-object.json#/properties/email"
- },
- "roles": {
- "$ref": "../../../components/user-object.json#/properties/roles"
- },
- "is_disabled": {
- "$ref": "../../../components/user-object.json#/properties/is_disabled"
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "200 response",
- "content": {
- "application/json": {
- "examples": {
- "default": {
- "value": {
- "id": 2,
- "created_on": "2020-01-30T09:36:08.000Z",
- "modified_on": "2020-01-30T09:41:04.000Z",
- "is_disabled": false,
- "email": "[email protected]",
- "name": "Jamie Curnow",
- "nickname": "James",
- "avatar": "//www.gravatar.com/avatar/6193176330f8d38747f038c170ddb193?default=mm",
- "roles": ["admin"]
- }
- }
- },
- "schema": {
- "$ref": "../../../components/user-object.json"
- }
- }
- }
- }
- }
- }
|