This application handlers the different states that can have a set of answers for user.
Here, we can use different options to manage the event state can have a group of answers. *
- Note: We have used package-oriented-design to create this API, you can know more about this link
The requirements of this project have the following:
-
If a user saves the same key multiple times (using update), it should save every answer. When retrieving an answer, it should return the latest answer.
-
If a user tries to create an answer that already exists - the request should fail and an adequate message or code should be returned.
-
If an answer doesn't exist or has been deleted, an adequate message or code should be returned.
When returning history, only mutating events (create, update, delete) should be returned. The "get" events should not be recorded.
It is possible to create a key after it has been deleted. However, it is not possible to update a deleted key. For example the following event sequences are allowed:
create → delete → create → update
create → update → delete → create → update
However, the following should not be allowed:
create → delete → update
create → create
design of solution
- Run follow command:
make setup
make api-forward
- Run follow command:
make remove-all
make test
##Documentation API Swagger
To watch, please click in the next link:
http://localhost:8080/swagger/index.html#/
These are detail endpoints