# Wrong JSON Schema definition for weekly\_days

**URL:** <https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910>\
**Category:** API and Webhooks\
**Created:** [September 2, 2020, 2:43pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910 "2020-09-02T14:43:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nean](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nean/32/14558_2.png) [@nean](https://devforum.zoom.us/u/nean)\
**Post date:** [September 2, 2020, 2:43pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/1 "2020-09-02T14:43:49Z")

</div>

**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](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate))

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

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [September 8, 2020, 2:06pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/2 "2020-09-08T14:06:51Z")

</div>

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:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/f30321581ec53193206aa3b46a003f2a0343be68.png)

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

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![nean](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nean/32/14558_2.png) [@nean](https://devforum.zoom.us/u/nean)\
**Post date:** [September 9, 2020, 6:31am UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/3 "2020-09-09T06:31:47Z")

</div>

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)

```auto
"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

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [September 11, 2020, 4:33pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/4 "2020-09-11T16:33:57Z")

</div>

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:

```auto
        "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](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarcreate) endpoint:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/1/168bce11d057eeada655000c32fe2b9bea222c7d.png)

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

---

<div class="post-metadata">

**Author:** ![nean](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/nean/32/14558_2.png) [@nean](https://devforum.zoom.us/u/nean)\
**Post date:** [September 12, 2020, 1:58pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/5 "2020-09-12T13:58:45Z")

</div>

Hi @will.zoom,

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

![SharedScreenshot](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/9c8aac2cde9fdf6c20ad01a9b79dc6be7886ec1e.jpeg)

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [September 15, 2020, 4:16pm UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/6 "2020-09-15T16:16:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shrijana.g](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/shrijana.g/32/605_2.png) [@shrijana.g](https://devforum.zoom.us/u/shrijana.g)\
**Post date:** [September 16, 2020, 1:51am UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/7 "2020-09-16T01:51:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [October 16, 2020, 11:51am UTC](https://devforum.zoom.us/t/wrong-json-schema-definition-for-weekly-days/28910/8 "2020-10-16T11:51:27Z")

</div>

Closed on October 16, 2020, 11:51am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
