Java spring boot based web api to suggest travel directions on Singapore MRT
Java 1.8
- Java 1.8
- Spring Boot
- Spring MVC
- Junit 5
- Mockito
- Maven
- Swagger core 2.0
- Download
transport-0.0.1-SNAPSHOT.jarfrom executable directory. - Run jar file
java -jar transport-0.0.1-SNAPSHOT.jar - System logs can be found at
logs/system_log.login installation directory
- Clone the git repo.
- Using eclipse import as maven project
- Locate
com.zendesk.direction.Application.java - Right click and run as
Spring Boot App
After running the jar file api documentation and swagger file can be accessed from following location
- Visit this url to access swagger documentation of APIs http://localhost:8080/swagger-ui.html
- Swagger file can be found here http://localhost:8080/v2/api-docs
- Transit directions can be fetched either by using mrt station names or mrt ids.
- MRT station names are case insensitive, but mrt ids are case sensitive.
- If date & time of travel is not specified then directions will be generated for current date & time.
- Transit directions for future date and time can be generated by passing appropriate date & time.
directions/mrt/from/{from}/to/{to}
directions/mrt/from/bishan/to/clementi
directions/mrt/from/{from}/to/{to}/datetime/{datetime}
directions/mrt/from/bishan/to/clementi/26-10-2020 19:30
directions/id/from/{from}/to/{to}
directions/id/from/CC13/to/EW5
directions/id/from/{from}/to/{to}/datetime/{datetime}
directions/id/from/CC13/to/EW5/26-10-2020 19:30