feat: PATCH /me documentation
This commit is contained in:
@@ -15,6 +15,7 @@ Base path: `/api/v1`.
|
||||
- `POST /auth/login/password`: password login fallback.
|
||||
- `POST /auth/change-password`: change the authenticated user's password.
|
||||
- `GET /me`: return the authenticated user.
|
||||
- `PATCH /me`: edit user informations.
|
||||
|
||||
Protected endpoints use:
|
||||
|
||||
|
||||
@@ -385,6 +385,21 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"EditUserRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"phone": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"EmailRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -2390,6 +2405,48 @@
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
},
|
||||
"patch": {
|
||||
"description": "Updates fields of the authenticated user's profile.",
|
||||
"operationId": "AuthController.editUser",
|
||||
"parameters": [ ],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/EditUserRequest"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OkResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "User profile updated successfully."
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid parameter type or structural error."
|
||||
},
|
||||
"401": {
|
||||
"$ref": "#/components/responses/Unauthorized"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": [ ]
|
||||
}
|
||||
],
|
||||
"summary": "Edit current user profile",
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/me/rewards": {
|
||||
|
||||
Reference in New Issue
Block a user