Skip to content

Conversation

@aababilov
Copy link
Collaborator

ValidationContext is used to inject params to constructors of *Validator classes. ValidationContext initially supported only CountryCode and CurrentDateTime, e.g.:

@Inject
ExpiredCalendarValidator(
CurrentDateTime currentDateTime, // Injected from ValidationContext
GtfsCalendarTableContainer calendarTable,
GtfsCalendarDateTableContainer calendarDateTable) {...}

This change allows the user to inject any types required for custom validation logic.

ValidationContext is used to inject params to constructors of *Validator
classes. ValidationContext initially supported only CountryCode and
CurrentDateTime, e.g.:

  @Inject
  ExpiredCalendarValidator(
      CurrentDateTime currentDateTime, // Injected from ValidationContext
      GtfsCalendarTableContainer calendarTable,
      GtfsCalendarDateTableContainer calendarDateTable) {...}

This change allows the user to inject any types required for custom
validation logic.
/**
* Represents a name of a GTFS feed, such as "nl-openov".
*
* @return the @code{GtfsFeedName} representing the feed's name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to your PR, but this method comment seems incorrect. Understood if you don't want to fix it here, but if you were willing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix it while I am here. This comment is pretty confusing.

@bdferris-v2
Copy link
Collaborator

Added @davidgamez as an FYI.

@aababilov
Copy link
Collaborator Author

Thanks a lot for the quick review!

@aababilov aababilov merged commit c0cd6be into MobilityData:master Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants