feat: PATCH /me documentation

This commit is contained in:
2026-06-15 11:16:53 +02:00 Unverified
parent 9858830459
commit 5beb64c1e6
2 changed files with 111 additions and 53 deletions
+1
View File
@@ -15,6 +15,7 @@ Base path: `/api/v1`.
- `POST /auth/login/password`: password login fallback. - `POST /auth/login/password`: password login fallback.
- `POST /auth/change-password`: change the authenticated user's password. - `POST /auth/change-password`: change the authenticated user's password.
- `GET /me`: return the authenticated user. - `GET /me`: return the authenticated user.
- `PATCH /me`: edit user informations.
Protected endpoints use: Protected endpoints use:
+57
View File
@@ -385,6 +385,21 @@
], ],
"type": "object" "type": "object"
}, },
"EditUserRequest": {
"additionalProperties": false,
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone": {
"type": "string"
}
},
"type": "object"
},
"EmailRequest": { "EmailRequest": {
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
@@ -2390,6 +2405,48 @@
"tags": [ "tags": [
"Auth" "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": { "/api/v1/me/rewards": {