Open thill-odi opened 5 years ago
Initially, I agree with this, with an exception on the last part. I would propose that the attribute is always a URL (pointer) to a Route, as opposed to mixing the types (Route or URL). This would keep it simple for both publisher and consumer - the publisher only needs a string value to populate and the consumer only has to ingest the URL and can then process that part of the data at their time of choosing. It also helps to maintain the separation of Route from Opportunity Event for CRUD operations.
At the moment @blabyboy's suggestion that only the Route Metadata object be allowed (and not a URL) is specified. See https://www.openactive.io/modelling-opportunity-data/EditorsDraft, in particular the table for Section 5.6.
Note that if we hive Routes off into a separate specification we'll probably need to support URL references as well as the resolved object here.
Routes appear to support two use-cases:
The question, then, is of how Opportunities and Routes should relate to support these two cases.
The proposal would be that Routes should be available as a standalone datatype (so that one might have, e.g., an RPDE feed of Routes); but that a
route
attribute ought to be added to the Opportunity Event type, which takes a Route as its value, whether directly or via a URL.