You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The current version of the specification does not specify a model profile for OpeningHoursSpecification, instead relying on the less restrictive schema.org model definition. OpenActive tooling had previously assumed that OpeningHoursSpecification within dayOfWeek was a single value.
To create convergence in implementation, it is proposed that OpeningHoursSpecification be defined with the Modelling Opportunity Data specification as follows, in line with Google's own recommendations:
The closing time. Set "00:00" for the value of opens and closes to indicated the Place is closed on the specified days. Note this property is required when used within specialOpeningHoursSpecification.
The opening time. Set "00:00" for the value of opens and closes to indicated the Place is closed on the specified days. Note this property is required when used within specialOpeningHoursSpecification.
Note that dayOfWeek is defined above only as an array, following the OpenActive convention of having each property defined as either a single value or an array, to increase usability of the data and specifications.
The date after which the item is no longer valid. The item will cease to be valid at the end of the specified day.
It is also proposed that use of schema.org's existing specialOpeningHoursSpecification property be defined within the specification, as follows:
The specialOpeningHoursSpecification property of the Place is used to explicitly override standard opening hours brought in scope by openingHoursSpecification, using the validFrom and validThrough properties to define the applicability of such overrides.
Usage and processing
It is proposed that the specification should also include processing and usage specification for the following, in line with Google's own recommendations:
Definition of "Open all day" as "opens": "00:00", "closes": "23:59"
Definition of "Closed all day" as "opens": "00:00", "closes": "00:00"
Usage example of "late opening hours" as "opens": "18:00", "closes": "03:00"
Use and definition of "dayOfWeek": [ "https://schema.org/PublicHolidays" ] as "a placeholder for all official public holidays in the location in which the Place is located. It can be used to indicate opening hours on public holidays, overriding general opening hours for the day of the week on which a public holiday occurs".
Use of validFrom and validThrough to specify seasonal opening hours within openingHoursSpecification (optional), and override applicability within specialOpeningHoursSpecification (required).
Use and definition an OpeningHoursSpecification within specialOpeningHoursSpecification with an undefined dayOfWeek as representing "every day".
This allows the following example, assuming it is also closed during January due to COVID-19, to be easily and concisely specified in JSON:
Given all current implementers of OpeningHoursSpecification are engaged in OpenActive Open Booking API implementation, the tooling has been updated to reflect dayOfWeek as an array based on the above, to allow implementers to make a quick change that will ensure implementation consistency going forward across the OpenActive ecosystem. This is a breaking change within the validator, however it is not a breaking change within the modelling specification as this property and the OpeningHoursSpecification type were previously underspecified.
Please comment if this creates issues, as dayOfWeek can be made available as both a single value and an array within the tooling, though this would be at the expense of adding complexity to the next version of the specification for the sake of backwards compatibility with the previous de facto standard.