This repo implements the HTTP API for GLVD.
Note
This is heavily work in progress.
Required/recommended software:
A local setup including the database with sample data can be setup using podman compose.
This requires building the jar file first.
See compose-up.sh
for the required steps to bring up a local environment.
After about a minute you should be able to perform an HTTP GET request on http://localhost:8080/readiness and get a response with status code 200.
Find example requests to play with the API in the api-examples
folder.
They are created with Bruno, an open source and easy to use HTTP client.
The API is documented here.
Those requests and responses are generated from tests automatically using Spring REST Docs. Note that you will need to adapt the hostname given in those docs.
Since the tests depend on our specific postgres image with a defined set of data, we make use of a container for providing that.
Running the tests should be as easy as:
./start-db-for-test.sh
./gradlew test --info
Alternativly, you can run the tests also in the Java IDE of your choice, as long as the db container is running.