feat: Initial support for Fares v2 validation.
Per issue #1201, adds validation for files and fields added for Fares v2 base spec changes.
Please make sure these boxes are checked before submitting your pull request - thanks!
- [x] Run the unit tests with
gradle testto make sure you didn't break anything - [x] Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
- [x] Linked all relevant issues
Initial draft, mostly to see what happens when validating a few existing feeds.
Now that #1248 has been committed and integrated, this PR is ready for official review.
fare_transfer_rule_forbidden_duration_limit
- spec mention in
fare_transfer_rules.duration_limit_type: Forbidden iffare_transfer_rules.duration_limitis empty.- pseudo code: If [
fare_transfer_rules.duration_limit== '' andfare_transfer_rules.duration_limit_type!= ''], trigger the notice
@isabelle-dr I think this has been already added with the FareTransferRuleDurationLimitWithoutTypeNotice here. Could you confirm this is what you were looking for?
I believe @isabelle-dr was correct that I didn't have a validation check for when duration_limit_type was specified but duration_limit was not. I've added that now.
I believe all validation rules have documentation in RULES.md at this point. Let me know if you see things differently.
As for fare_rules.txt and fare_attributes.txt, those seem to be clarifications of the Fares V1 spec. I'm happy to add support for that, but I'd argue for splitting it out into a separate PR to keep things (relatively) focused. Thoughts?