Wrong use of oneOf in OpenAPI spec

Hi,

as we’re working on generating Zoom integration for our iPaaS platfrom Appmixer from your OpenAPI spec, we noticed that your OpenAPI spec is incorrect in places where you use the oneOf schema keyword. For example, in the spec downloaded from https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#overview, you can see e.g. in the definition of the /users/{userId}/meetings route the use of oneOf for the userId property:

{
  "name": "userId",
  "in": "path",
  "description": "The user ID or email address of the user. For user-level apps, pass the `me` value.",
  "required": true,
  "schema": {
    "oneOf": [
      {
        "type": "string",
        "example": "6dfgdfgdg444447b0egga"
      },
      {
        "type": "string",
        "format": "email",
        "example": "jchill@example.com"
      },
      {
        "type": "string",
        "enum": [
          "me"
        ],
        "example": "me"
      }
    ]
  }
}

The problem is that the “me” value for the userId property never passes the validation test since “me” is valid against 2 out of the 3 subschemas (it’s a string and also an enum). Therefore, the “me” value does not validate against the oneOf since in oneOf, value is only valid if it validates against EXACTLY ONE of the subschemas, not more. See oneOf, anyOf, allOf, not.

There are more occurrences of this wrong userId definition. Note that we did not check other APIs besides Zoom Meetings so the issue might be somewhere else too.

I assume the keyword should be anyOf instead.

It’d be great to have this corrected to make sure tools that generate clients based on the OpenAPI spec are valid.

Thanks!

Hi @david6
Thank you so much for reaching out to the Zoom Developer forum and welcome to our community!
We really appreciate your feedback!
Thanks for bringing this up to our attention and I will make sure to pass this feedback internally and will keep you updated if I hear anything about it.
Have an excellent day,
Elisa

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