Open nickevansuk opened 6 years ago
Now depends on https://github.com/openactive/opportunity-api/issues/10
@nickevansuk are you aware of any implementations that use strings for modified (discounting cases where the string is something like "1234"
which should actually be an integer)? Perhaps someone puts dates (e.g. ISO-8601) in here?
Although the 1.0 spec does support both, we have been strongly encouraging implementations to converge on integer modified
values, pending the next spec version which will include this change, to make data consumption easier for data users.
The libraries only support integer:
And the RPDE validator will return a warning to encourage integer to be used:
The model validator still allows strings (however could easily be updated so that it does not):
I believe British Cycling (the first ever RPDE implementation) was the only implementation to have adopted a string, however as this thread shows, they quickly moved to the integer approach based on implementation feedback. Since then I don't believe any other implementations have made use of a string for this purpose.
I think it's safe to assume that this will be included in the next version of the RPDE spec given all of the above, and so implementers can assume that modified
is an integer for all implementations.
Proposer
ODI
Use Case
Make RPDE easier to consume by enforcing integer
modified
date and afterTimestamp. Allowingmodified
to be either string or integer causes issues when using the modified date for cache invalidation, as both cases must be considered in the data store and application layer.Proposal
Enforce integer
modified
date and afterTimestamp as MUSTs.Examples