Wrong JSON Schema definition for weekly_days

Description
Incorrect JSON schema in the documentation for create webinar and possibly create meeting and other places where recurrence definition is used.

current schema for weekly_days: (copied from here https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate)

        "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.

Error
assume weekly_days: “1,7”
Error: Invalid type. Expected Integer but got String.

Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT | OAUTH

Which Endpoint/s?
Create Meeting, Create Webinar

How To Reproduce (If applicable)
NA

Screenshots (If applicable)
NA

Additional context
Add any other context about the problem here.

1 Like

Hey @nean,

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:

Let me know if you’re still having issues after giving this a try!

Thanks,
Will

Hey @will.zoom,

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)

"recurrence": {
  "type": 2,
  "repeat_interval": 1,
  "weekly_days": "1,7",
  "end_times": 2
}

The issue is in the JSON schema linked to the documentation. We changed the schema at our end to allow the comma separated day string to pass through

Hi @nean,

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 again for working through this—just let me know if I’m misunderstanding any part of what you’ve shared so far!

Best,
Will

Hi @will.zoom,

Thanks for the reply, I have highlighted copy button from the create webinar page in the following screen shot

SharedScreenshot

Hey @nean,

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!

cc: @shrijana.g

Best,
Will

1 Like

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.

Thanks,
Shrijana