[R8] Update README with API Documentation for DELETE /patients and minor refactor for DELETE /doctors

This commit is contained in:
Mirna Gama 2024-01-10 21:54:25 -03:00 committed by Mirna Gama
parent f95b0677e8
commit 60fdb0f2d3

View File

@ -192,7 +192,7 @@ Hospital Management API built in Spring Boot
``` ```
{ {
"id": 2, "id": 2,
"name": "DEACTIVATED USER TEST", "name": "DEACTIVATED DOCTOR TEST",
"email": "test@gmail.com", "email": "test@gmail.com",
"crm": "12456", "crm": "12456",
"telephone": "(81) 99999999", "telephone": "(81) 99999999",
@ -222,6 +222,7 @@ Hospital Management API built in Spring Boot
| ------------- | ------------- | | ------------- | ------------- |
| `200` | _Successful operation_ | | `200` | _Successful operation_ |
| `400` | _Validation Error_ | | `400` | _Validation Error_ |
| `404` | _Entity not found_ |
### /patients ### /patients
@ -381,4 +382,39 @@ Hospital Management API built in Spring Boot
| `200` | _Successful operation_ | | `200` | _Successful operation_ |
| `400` | _Validation Error_ | | `400` | _Validation Error_ |
#### DELETE - [**/api/v1.0/patients/{id}**] - Deactivates an existing patient
- **Response Body Example:**
```
{
"id": 1,
"name": "DEACTIVATED PATIENT TEST",
"email": "test@gmail.com",
"cpf": "11111111111",
"telephone": "(81) 99999999",
"active": false,
"address": {
"street": "TEST STR.",
"neighborhood": "TEST NEIGHBORHOOD",
"zipCode": "12345678",
"city": "TEST CITY",
"state": "ST",
"additionalDetails": null,
"houseNumber": null
}
}
```
- **Request Parameters:**
| Key | Description |
| ------------- | ------------- |
| `id` | _Unique identifier of the patient who will be deactivated_ |
- **Responses:**
| Code | Description |
| ------------- | ------------- |
| `200` | _Successful operation_ |
| `400` | _Validation Error_ |
| `404` | _Entity not found_ |