Repository navigation
Make agency id feed scoped - #3035
Conversation
|
I think now is the time to make all ids feed scoped, so I support doing this breaking change. I already did some cleanup when refactoring the API. I can review this PR when you have integrated the changes in dev-2.x. One comment on the code changes: All API types uses String as a id type. The internal type should use FeedScopedId and the FeedScopedIdMapper should be used to map. One goal here is to make the internal ID an interface so we can change the id generation and use different strategies per deployment/feed. In Norway all ids are uniq and we do not want the a feed-scoped id, because this make it harder for clients to integrate with other services. |
|
Updated to newest dev-2.x. The The |
Yes. |
|
@t2gran Those are now updated, along with a changelog entry and migration guide. Could you re-open this, as I don't seem to have permissions to do it. |
|
We can test this with NeTEx at Entur this week. |
|
I tested this with Entur's NeTEx feed and found no problems. |
t2gran
left a comment
There was a problem hiding this comment.
Overall this looks good, but I expect you to get some merge conflicts and there is this one comment on parsing a list of ids.
This pull request aims to make the agency id feed scoped, similar to how all the other transit entities are. The reason for the previous behaviour is due to the OBA GTFS models, which were previously used as the internal model for all transit entities in OTP, and for which the agency id was only a string. As we have copied over the models to internal models, we have the freedom to change them.
A comment in the code suggest that this is a temporary hack, and should be fixed. Another reason for fixing this, is that the HSLDevcom GraphQL API has the agencies as feed scoped, and when porting over the api to a sandbox feature, we need to somehow make the agencies feed aware. Another less invasive alternative, would be just writing the feed in a separate field in the agency object.
This is a breaking change, as the api responses for the agency will now include the feed id, as they do with all the other transit entities. Similarly for input parameter for banned and preferred agencies, the feed id is now required in similar format to how it is output.
To be completed by pull request submitter:
To be completed by @opentripplanner/plc: