This application has been designed to be used by the QA Engineers to practice and improve their API manual and automation testing skills. It includes CRUD REST API Endpoints and OpenAPI Documentation (Swagger).
GET /api/v1/employees - returns list of all employees
POST /api/v1/employees - creates a new employee
GET /api/v1/employees/{ID} - returns specific employee by ID
PUT /api/v1/employees/{ID} - updates specific employee by ID
DELETE /api/v1/employees/{ID} - deletes specific employee by ID
GET /api/v1/simulate/server/error - simulates internal server error, status code 500
JWT Authorization
POST /api/v1/simulate/token - simulates an endpoint that returns JWT value (the request body should include an object with 'username' and 'password' properties, both having 'admin' as value)
GET /api/v1/simulate/get/employees - requires the above JWT value (returned by POST /api/v1/simulate/token) as Authorization header (Bearer value) to return status code 200 with a list of all employees, otherwise it will return status code 401
replace 8887 with any other desired port that will be used by the app
remove '--rm' from the command if you want to persist the container for further use; otherwise, when you stop the app, the container will be removed as well
-d makes the app to run in the background of your terminal. It does not receive input or display output. If you want the logs to be instantly shown in the terminal, remove this flag.
Java with Maven, Springboot, and H2 in-memory database
Note: when restarting the app, the database will be reset to initial default records. It means that if you added/updated employees, they will no longer be available.