openactive / models-php

PHP Models for the OpenActive Opportunity and Booking Specifications
MIT License
6 stars 8 forks source link

Validator: Required property @id is missing from ScheduledSession. #95

Open drinkynet opened 2 years ago

drinkynet commented 2 years ago

Its possible to not set the @id for an RpdeItem when building an RpdeBody. The validator then flags an error that it is missing when you validate the feed.

It may aid development if a RuntimeException was thrown if the field is missing so you can pick it up in development before you get to the validator stage.

nathansalter commented 2 years ago

Yes, we should add something into the RPDE validation process to check that IDs are set for all items.