To run the project execute the mvn spring-boot:run
command.
To run the tests execute the mvn test
command.
Before running the project make sure the Postgres database is populated and running.
You can do that with Docker using docker-compose up
in the project root folder
Or, add manually with schema.sql
and data.sql
located inside the database-init folder.
Please use admin
and password
for basic authentication
You can also access the swagger ui interface in http://localhost:8080/swagger-ui.html
Calculates the distance between two postcodes
Name | Type | Description |
---|---|---|
postcodeA | string | string related to the first postcode |
postcodeB | string | string related to the second postcode |
Status | Meaning | Description |
---|---|---|
200 | OK | successful operation |
400 | Bad Request | wrong input parameters |
404 | Not Found | postcode not found |
Updates location with new latitude and longitude
Name | Type | Description |
---|---|---|
locationId | long | id for the location that will be updated |
latitude | string | string that will be updated to the location |
longitude | string | string that will be updated to the location |
Status | Meaning | Description |
---|---|---|
200 | OK | successful operation |
400 | Bad Request | wrong input parameters |
404 | Not Found | location not found |