Application for managing Employee and his state based on predefined state transition rules as State machine.
add new employee
Code |
Description |
201 |
CREATED |
400 |
Bad Request |
500 |
Internal Server Error |
Get Employee
Name |
Located in |
Description |
Required |
Schema |
id |
path |
Employee Id |
Yes |
long |
Code |
Description |
200 |
SUCCESS |
400 |
Bad Request |
500 |
Internal Server Error |
Update status of an employee
Name |
Located in |
Description |
Required |
Schema |
id |
path |
Employee Id |
Yes |
long |
Code |
Description |
200 |
SUCCESS |
400 |
Bad Request |
500 |
Internal Server Error |
requirement to set up the service
- Java 11
- maven
- postman to import emApi.yaml as postman collection
to test the application
- docker
Step 1 build the service using maven (packaging)
Step 2 - *run the service locally *
java -jar ./target/employee-management-1.0.1-SNAPSHOT.jar
Step 3 [optional] dockerized and run service as docker container
- run the docker container:
docker run $dockerContainerId
- import emApi.yaml as postman collection
- change the baseUrl var on postman with your server url and running port number example
http://localhost:8080
- test all endpoints
Step 5 review the service documentation
- you can review api specs emApi.yaml
on swagger editor.