Microservice architecture project that contains a web service and processing service. Spring(web, data), RabbitMQ, Apache Camel.
200: Success
400: Bad request
404: Cannot be found
POST /api/v1/users
{
"name": "Ivan",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "[email protected]"
}
Status: 200
{ "id": 1,
"name": "Ivan",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "[email protected]"
}
Status: 400
{
"message": "User with email [[email protected]] has already been created"
}
PUT /api/v1/users/{id}
{
"name": "Nikita",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "[email protected]"
}
Status: 200
{ "id": 1,
"name": "Nikita",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "[email protected]"
}
Status: 404
{
"message": "User with id [2] not found"
}
GET /api/v1/users/{id}
Status: 200
{
"id": 1,
"name": "Nikita",
"surname": "Ivanov",
"patronymic": "Ivanovich",
"email": "[email protected]"
}
Status: 404
{
"message": "User with id [2] not found"
}
DELETE /api/v1/users/{id}
Status: 200
Status: 404
{
"message": "User with id [2] not found"
}
MIT