Description
Incorrect JSON schema in the documentation for create webinar and possibly create meeting and other places where recurrence definition is used.
"weekly_days": {
"type": "integer",
"description": "Use this field **only if you're scheduling a recurring webinar of type** `2` to state which day(s) of the week the webinar should repeat. <br>\n**Note:** If you would like the webinar to occur on multiple days of a week, you should provide comma separated values for this field.<br>`1` - Sunday. <br>`2` - Monday.<br>`3` - Tuesday.<br>`4` - Wednesday.<br>`5` - Thursday.<br>`6` - Friday.<br>`7` - Saturday.",
"enum": [
1,
2,
3,
4,
5,
6,
7
],
"x-enum-descriptions": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
]
},
Our current solution is to remove the enum from all occurrences of weekly_days in the schema before I validate the payload.
Thanks for reaching out about this and for providing an example. As a first step, can I kindly ask you to confirm what value you’re passing for the type field nested within the weekly_days object? This must be an integer of value 2 (it looks like you might be passing a string) if you’re passing the values for the days of the week on which the webinar will recur:
The following recurrence is not valid according to the given json schema, the json schema in the example expects weekly_days to be an integer and one of the values from the enum.
But the doc also says that we can pass a string with day values separated by comma.
(recurs Sunday and Saturday every week for 2 weeks)
Thanks for the detailed reply and apologies for the back and forth here.
Just to make sure we’re on the same page—you’re correct in that the most recent schema example you’ve provided will return a 200 response, and the "1,7" value you’re passing for weekly days does not throw an error.
Going back to your first example with the following schema:
"weekly_days": {
"type": "integer",
"description": "Use this field **only if you're scheduling a recurring webinar of type** `2` to state which day(s) of the week the webinar should repeat. <br>\n**Note:** If you would like the webinar to occur on multiple days of a week, you should provide comma separated values for this field.<br>`1` - Sunday. <br>`2` - Monday.<br>`3` - Tuesday.<br>`4` - Wednesday.<br>`5` - Thursday.<br>`6` - Friday.<br>`7` - Saturday.",
"enum": [
1,
2,
3,
4,
5,
6,
7
],
"x-enum-descriptions": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
]
},
Can I ask where in our documentation you’ve copied the enum object from? weekly_days is an object expecting only an integer or only a string with comma separated values stated in the documentation.
Apologies, as I’m not seeing where in the documentation the issue with the schema lies—I do see that the original JSON sample you provided includes nested objects within weekly_days, but I’m not seeing where you copied that from our Create Webinar endpoint:
Thanks so much for clarifying this, and apologies for not catching that sooner—I can now see that the object that’s returned when clicking on the copy button for the schema on this endpoint doesn’t correspond directly with the details shown in the example.
We will work on updating this—thanks again for raising!
Thanks a lot for bringing this up @nean and @will.zoom! The data type for “weekly_days” is string. The reference doc has been updated to resolve this.