-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/nav 140 utility endpoints health and service info #96
Feature/nav 140 utility endpoints health and service info #96
Conversation
…in the schedule and routeing controller
…n various methods across the package
… and not found resources
…NAV-140-Utility-endpoints-Health-and-ServiceInfo
- Add actuator dependency. - Configuration via application.properties
- Run swagger UI on further endpoints. - Serve application documentation as JSON. - Make git and build information available to Spring app.
- Add controller for home "/" endpoint. - New thymeleaf dependency. - Index template and logo.
- Improve design of home. - Move configs into separate app.config package.
- Ignore git specifics in docker build to not expose git specifics in production images.
…vided in routing controller - Instead of checking coordinates against negative values, are against null now. - In the swagger UI the default value is now not set. - Update description of swagger.
…er max value as default value in the API. - Swagger UI is more readable. - Adjust parameter validation.
- Catch exceptions from raptor algorithm and rethrow as ConnectionRoutingException. - Adjust signatures.
…in input parameters
- Implementation for gtfs raptor service, based on the gtfs schedule.
- Belongs semantically to the schedule.
- Handles stop lookups and validation. - Handles datetime validation and validity check.
- Refactor test: Move test cases into individual nested test classes. - Unify naming of test cases.
Note: Metrics should not be exposed when in production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell changes look food.
Only remaining point I see is the implementation of our date ranges in the gtfs raptor service.:
- Getting start and end date only by streaming the calendars and ignoring exceptions will not always work.
- What about cases where there is no active service for a day within the range?
- Since this check will run many times (for each request) I wouldn't calculate the ranges every time but store them as attributes.
src/main/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorValidity.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
submit review
…n if file is required, log warning otherwise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
This PR adds:
/
.ConnectionRoutingRequest
to theConnectionRoutingInterface
. In the service,IllegalArgumentException
s are caught from theRaptorRouter
and converted toConnectionRoutingException
s at the service level. These error messages are forwarded to the user, and the stack trace is logged. Other exceptions (e.g.,NullPointerException
s) are not caught, and therefore the client receives a generic internal server error.Validity
check at the service level, which is used to validate date and time input from the client.RoutingController
andScheduleControllerTest
.