From 005eded6fe4e302832c48e7ed832256d6e1246fa Mon Sep 17 00:00:00 2001 From: Mirna Gama Date: Sat, 6 Jan 2024 19:51:35 -0300 Subject: [PATCH] [R6] Add missing get by id doc --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/README.md b/README.md index b0d2142..9fa5f3d 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,43 @@ Hospital Management API built in Spring Boot | `201` | _Successfully created_ | | `400` | _Validation Error_ | +#### GET - [**/api/v1.0/doctors/{id}**] - Get an existing doctor + +- **Response Body Example:** +``` +{ + "id": 1, + "name": "DOCTOR TEST", + "email": "test@gmail.com", + "crm": "12456", + "telephone": "(81) 99999999", + "specialty": "ORTHOPEDICS", + "active": true, + "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 doctor who will be fetched_ | + +- **Responses:** + +| Code | Description | +| ------------- | ------------- | +| `200` | _Successful operation_ | +| `404` | _Entity not found_ | + #### GET - [**/api/v1.0/doctors**] - Get a list of doctors - **Response Body Example:** @@ -216,6 +253,43 @@ Hospital Management API built in Spring Boot | `201` | _Successfully created_ | | `400` | _Validation Error_ | + +#### GET - [**/api/v1.0/patients/{id}**] - Get an existing patient + +- **Response Body Example:** +``` +{ + "id": 1, + "name": "PATIENT TEST", + "email": "test@gmail.com", + "cpf": "11111111111", + "telephone": "(81) 99999999", + "active": true, + "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 fetched_ | + +- **Responses:** + +| Code | Description | +| ------------- | ------------- | +| `200` | _Successful operation_ | +| `404` | _Entity not found_ | + #### GET - [**/api/v1.0/patients**] - Get a list of patients - **Response Body Example:**