This is a Java 8 Maven project.
Uses Spark micro framework for creating web applications.
The project uses JUnit 5 and REST assured for testing.
To run the tests:
mvn test
To start the application:
mvn compile exec:java
The application is published on docker hub. Run it:
podman run -p8001:8001 "codecop/rogue-inventory"
List the whole inventory:
get localhost:8001/inventory
returns JSON body with
[
{ "item": "(", "description": "a bow" },
{ "item": "k", "description": "Master key" }
]
Check for a specific item, e.g. only open door if key is there:
get localhost:8001/inventory/k
returns
{ "item": "k", "description": "Master key" }
or 404.
To add a new item to the inventory:
post { "item": "-", "description": "little knife" } to localhost:8001/inventory
And
delete localhost:8001/inventory/k
removes the item from the inventory, e.g. if it has been used.
To clear the whole inventory:
delete localhost:8001/inventory
Content type
Image
Digest
sha256:2006ffc0c…
Size
58.3 MB
Last updated
26 days ago
docker pull codecop/rogue-inventory