Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PartialSchedule hint error for incomplete schedules #292

Open
nickevansuk opened this issue Oct 2, 2018 · 0 comments
Open

PartialSchedule hint error for incomplete schedules #292

nickevansuk opened this issue Oct 2, 2018 · 0 comments
Labels
rule A rule suggestion for implementation schedule-related Ticket relates to the correct and consistent indication of a time when an Event is occurring.

Comments

@nickevansuk
Copy link
Contributor

nickevansuk commented Oct 2, 2018

Error message relevant to data publishers directed to this page

The Schedule is invalid due to missing essential properties. Schedule must only be used if properties within it can be populated such that a full forward schedule of subEvents can be automatically generated. If you are trying to include indicative data, such as "this class runs on Wednesdays", use PartialSchedule instead.

For example:

"eventSchedule": {
    "type": "PartialSchedule",
    "byDay": [
      "http://schema.org/Wednesday"
    ]
  },

Rule spec for validator developers only

  • Target Model(s): Event
  • Target Field(s): eventSchedule
  • Severity: Error
  • Category: Data Quality

If eventSchedule is present without the properties needed to render a schedule, display the error above. This is phrased as an error rather than a warning so that it is displayed above the Schedule "required fields" errors.

Test data:

{
  "@context": "https://openactive.io/",
  "id": "https://everyoneactiveuat-openactive.azurewebsites.net/api/sessions/1402CBP20150217",
  "identifier": "1402CBP20150217",
  "type": "SessionSeries",
  "organizer": {
    "type": "Organization",
    "name": "Everyone Active",
    "url": "https://www.everyoneactive.com/"
  },
  "activity": [
    {
      "type": "Concept",
      "id": "https://openactive.io/activity-list#5e78bcbe-36db-425a-9064-bf96d09cc351",
      "prefLabel": "Bodypump™",
      "inScheme": "https://openactive.io/activity-list"
    }
  ],
  "category": [
    "Group Exercise Classes",
    "Toning & Strength",
    "Group Exercise - Virtual"
  ],
  "name": "Virtual BODYPUMP",
  "description": "This is the virtual version of the original barbell class, which will help you get lean, toned and fit - fast. Les Mills™ Virtual classes are designed for people who cannot get access to our live classes or who want to get a ‘taste’ of a Les Mills™ class before taking a live class with an instructor. The classes are played on a big video screen, with dimmed lighting and pumping surround sound, and are led onscreen by the people who actually choreograph the classes.",
  "genderRestriction": "https://openactive.io/NoRestriction",
  "ageRange": {
    "type": "QuantitativeValue",
    "name": "Ages 16+",
    "minValue": 16
  },
  "image": [
    {
      "type": "ImageObject",
      "url": "https://s3-eu-west-2.amazonaws.com/prod-everyoneactive-wp/wp-content/uploads/2017/10/26092236/Ea-Image2.jpg"
    }
  ],
  "url": "https://profile.everyoneactive.com/booking?Site=0140&Activities=1402CBP20150217&Culture=en-GB",
  "location": {
    "type": "Place",
    "url": "https://www.everyoneactive.com/centres/Middlesbrough-Sports-Village",
    "name": "Middlesbrough S V",
    "identifier": "0140",
    "address": {
      "type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    },
    "telephone": "01642 728555",
    "geo": {
      "type": "GeoCoordinates",
      "latitude": 54.543964,
      "longitude": -1.20978500000001
    }
  },
  "eventSchedule": {
    "type": "Schedule",
    "byDay": [
      "http://schema.org/Tuesday"
    ]
  },
  "subEvent": [
    {
      "type": "ScheduledSession",
      "startDate": "2018-10-02T19:15:00Z",
      "endDate": "2018-10-02T19:44:59Z",
      "remainingAttendeeCapacity": 16,
      "maximumAttendeeCapacity": 16,
      "identifier": 1400109454
    },
    {
      "type": "ScheduledSession",
      "startDate": "2018-10-09T19:15:00Z",
      "endDate": "2018-10-09T19:44:59Z",
      "remainingAttendeeCapacity": 16,
      "maximumAttendeeCapacity": 16,
      "identifier": 1400109455
    }
  ],
  "offers": [
    {
      "type": "Offer",
      "identifier": "OX-AD",
      "name": "Oxygen - Adult",
      "price": 3.3,
      "priceCurrency": "GBP"
    },
    {
      "type": "Offer",
      "identifier": "OX-SNR",
      "name": "Oxygen - Senior",
      "price": 3.3,
      "priceCurrency": "GBP",
      "ageRange": {
        "type": "QuantitativeValue",
        "minValue": 50
      }
    }
  ],
  "duration": "PT30M"
}
@nickevansuk nickevansuk added the rule A rule suggestion for implementation label Oct 2, 2018
@thill-odi thill-odi added the schedule-related Ticket relates to the correct and consistent indication of a time when an Event is occurring. label Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule A rule suggestion for implementation schedule-related Ticket relates to the correct and consistent indication of a time when an Event is occurring.
Projects
None yet
Development

No branches or pull requests

2 participants