Skip to content

Remove the "Conditionally Forbidden" presence condition from the spec  #347

@isabelle-dr

Description

@isabelle-dr

Context

When a field is described as Conditionally Required in the spec, three cases exist:

  1. A field or file is required under a certain condition, optional otherwise. It is the case for the calendar.txt, calendar_dates.txt, and levels.txt files, for the fields stops.stop_name, stops.stop_lat, stops.stop_lon, stops.zone_id and for many other fields.

  2. A field or file is required under a certain condition, forbidden otherwise. it is the case for fare_transfer_rules.duration_limit_type, translations.record_id, and translations.field_value.

  3. A field or file is required under a certain condition, forbidden under another condition, and optional otherwise. It is the case for stops.parent_station.

Problem

In the Fares v2 base implementation PR, a new presence condition was added to the spec: Conditionally Forbidden, and was applied to fare_transfer_rules.transfer_count. This field has the behavior described in category 2 above: required under a certain condition, forbidden otherwise.
We believe this field was initially designed as: forbidden under a certain condition, optional otherwise, and then changed when modifications were made to the PR.
This adds unnecessary complexity to the spec, this condition should only be used if a field is either forbidden or optional.

Solution

Remove the Conditionally Forbidden presence condition from the spec and describe fare_transfer_rules.transfer_count as Conditionally Required.

I'm happy to open a PR to do this fix if there is agreement from the community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GTFS ScheduleIssues and Pull Requests that focus on GTFS Schedule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions