This document outlines the steps to verify the stability of the People & Tax Ecosystem APIs.
Once the services are running, you can access the interactive API docs at:
- People Service: http://localhost:8080/swagger-ui/index.html
- Tax Engine Service: http://localhost:8081/swagger-ui/index.html
Base URL: http://localhost:8080
Endpoint: POST /people
Headers:
Content-Type:application/json
Body:
{
"personType": "EMPLOYEE_FULL_TIME",
"id": 101,
"name": "Rahul Dravid",
"email": "rahul.dravid@example.com",
"annualSalary": 1200000
}Expected Response: 201 Created
Endpoint: POST /people
Body:
{
"personType": "EMPLOYEE_CONTRACTOR",
"id": 102,
"name": "Hardik Pandya",
"email": "hardik@example.com",
"hourlyRate": 2000,
"hoursWorked": 160
}Endpoint: GET /people/101
Expected Response: JSON object of Rahul Dravid.
Endpoint: GET /people/101/income
Expected Response: 100000.00 (12,00,000 / 12)
Base URL: http://localhost:8081
Endpoint: POST /tax/calculate
Body:
{
"person": {
"personType": "EMPLOYEE_FULL_TIME",
"id": 999,
"name": "Richie Rich",
"email": "richie@example.com",
"annualSalary": 1500000
},
"regime": "NEW"
}Expected Response: JSON with calculated tax breakdown.
Endpoint: GET /tax/calculate/101?regime=NEW
Description: Fetches Rahul Dravid (101) from People Service and calculates tax.
Verification: Check logs for X-Correlation-ID to ensure it matches across both services.
- Swagger UI loads for both services.
-
POST /peoplecreates data successfully. -
GET /people/{id}retrieves correct data. -
POST /tax/calculatereturns valid tax computation. -
GET /tax/calculate/{id}works and shows orchestration success. - Logs show matching
X-Correlation-IDfor the orchestrated call.