Skip to content
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

Make Time, RealTimeTrip, and StopTimeUpdate interface properties optional #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

magnusburton
Copy link
Contributor

It's me again!
My feeds are not compatible with the current types so I wanted to make this update.

When the spec specified a field as Conditionally required I made the property optional. Below is an excerpt from a TripUpdate feed from Sweden.

Feed
entity {
  id: "14010516182011315"
  trip_update {
    trip {
      trip_id: "14010000660994806"
      start_date: "20240521"
      schedule_relationship: SCHEDULED
    }
    stop_time_update {
      stop_sequence: 34
      arrival {
        delay: 0
        time: 1716317220
      }
      departure {
        delay: 0
        time: 1716317220
      }
      stop_id: "9022001000306001"
    }
    stop_time_update {
      stop_sequence: 35
      arrival {
        delay: 0
        time: 1716317400
      }
      departure {
        delay: 0
        time: 1716317400
      }
      stop_id: "9022001000301001"
    }
    vehicle {
      id: "9031008000500547"
    }
    timestamp: 1716316188
  }
}
entity {
  id: "14050001704887972"
  trip_update {
    trip {
      start_time: "18:27:22"
      start_date: "20240521"
      schedule_relationship: CANCELED
      route_id: "9011001001700000"
      direction_id: 1
    }
    stop_time_update {
      stop_sequence: 1
      arrival {
        delay: 0
        time: 1716308842
      }
      departure {
        delay: 0
        time: 1716308842
      }
      stop_id: "9022001001951002"
    }
    stop_time_update {
      stop_sequence: 2
      arrival {
        delay: 0
        time: 1716308842
        uncertainty: 0
      }
      departure {
        delay: 0
        time: 1716308842
      }
      stop_id: "9022001001951001"
    }
    stop_time_update {
      stop_sequence: 3
      arrival {
        delay: 0
        time: 1716308842
      }
      departure {
        delay: 0
        time: 1716308842
      }
      stop_id: "9022001001941001"
    }
    stop_time_update {
      stop_sequence: 4
      arrival {
        delay: 0
        time: 1716308842
      }
      departure {
        delay: 0
        time: 1716308842
      }
      stop_id: "9022001001941002"
    }
    vehicle {
      id: "9031001002500096"
    }
    timestamp: 1716308843
  }
}

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.

1 participant