Autorest Swagger c# client

Description
We are having a hard time generating a C# client based on your swagger json using Autorest. Autorest is reporting the same errors as https://editor.swagger.io/ regarding additionalProperty: oneOf

Error
Structural error at paths./accounts/{accountId}/settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 3415
Structural error at paths./accounts/{accountId}/settings.patch.parameters.1.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 4071
Structural error at paths./accounts/{accountId}/plans/addons.post.parameters.1.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 6038
Structural error at paths./users/{userId}/settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 23069
Structural error at paths./users/{userId}/settings.patch.parameters.1.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 23718
Structural error at paths./groups/{groupId}/settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 32347
Structural error at paths./groups/{groupId}/settings.patch.parameters.1.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 32915
Structural error at paths./rooms/account_settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 35754
Structural error at paths./rooms/account_settings.patch.parameters.0.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 36045
Structural error at paths./rooms/locations/{locationId}/settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 36686
Structural error at paths./rooms/locations/{locationId}/settings.patch.parameters.0.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 36995
Structural error at paths./rooms/{roomId}/settings.get.responses.200.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 37600
Structural error at paths./rooms/{roomId}/settings.patch.parameters.1.schema
should NOT have additional properties
additionalProperty: oneOf
Jump to line 37907
Structural error at definitions.AccountSettingsAuthenticationUpdate
should NOT have additional properties
additionalProperty: oneOf
Jump to line 56358
Structural error at definitions.AccountSettingsAuthentication
should NOT have additional properties
additionalProperty: oneOf
Jump to line 56502
Structural error at definitions.GroupUserSettingsAuthenticationUpdate
should NOT have additional properties
additionalProperty: oneOf
Jump to line 56598
Structural error at definitions.GroupUserSettingsAuthentication
should NOT have additional properties
additionalProperty: oneOf
Jump to line 56699

How To Reproduce (If applicable)

  1. Upload swagger json to https://editor.swagger.io/
  2. See validation errors

Hey @kiesel.dennis, thanks for posting and using Zoom!

You will have to convert the JSON to Open API 3 and then it will work.

Screen Shot 2020-01-23 at 10.34.56 AM

Thanks,
Tommy

It doesn’t seem like we will be able to auto generate a c# client, even using the converted swagger. Autorest throws errors about the structure and generating the client using Swagger Editor created a client that is not buildable, with many errors.

Hey @kiesel.dennis,

We also have these, but they in beta and not up to date with our latest releases.

https://drive.google.com/drive/folders/1JfxC7Ybla3wc0xTpPAXMvO_g5n6m_TZM?usp=sharing

In the meantime, we are working to improve our client libraries.

Thanks,
Tommy

@tommy,

Thanks for your help. I think we are going to manually create a client library. The beta client fails to build as well.

1 Like

Thanks for letting me know @kiesel.dennis,

We will improve our Client Libraries.

Thanks,
Tommy

With a rough conversion pass through https://www.apimatic.io/ and a little massaging I was able to generate a working configuration for autorest.

https://filebin.ca/5GTeHw3txVpX/ZoomAPI.oas2.json-Swagger20.json

Due to some design eccentricities in many api endpoints there is a pretty heavy load of object duplication. As long as you don’t mind binding to objects named things like body18 due to missing descriptions this client looks pretty functional.

zoom: Any thoughts as to a timeline on updating your specs to be fully compliant?

1 Like

Hey @samf, thanks for providing a working configuration! :slight_smile:

Currently no timeline, but we are doing our best to get a long term solution soon.

Thanks,
Tommy

Thanks samf, this is json is much better

1 Like

Glad you found samf’s JSON helpful! :slight_smile:

-Tommy

Hey everyone,

Recently we launched Zoom Rivet for Node.js. Zoom Rivet is Zoom’s Official API Library and API Wrapper.

We currently support Node.js. Java, Python, GO, C#, and other languages are coming soon or being considered.

Zoom Rivet is available on npm and can be used to automatically handle OAuth and easily call Zoom APIs like Meetings, Phone, Users, Team Chat, Chatbot, Accounts, Video SDK, and more. It even includes a Webhook server to easily receive Zoom Webhooks.

npm install @zoom/rivet

Example that handles OAuth and calls a Meeting API and listens to a webhook event:

import { MeetingsS2SAuthClient } from "@zoom/rivet/meetings";

(async () => {
   const meetingsClient = new MeetingsS2SAuthClient({
      clientId: process.env.CLIENT_ID,
      clientSecret: process.env.CLIENT_SECRET,
      webhooksSecretToken: process.env.WEBHOOKS_SECRET_TOKEN,
      accountId: process.env.ACCOUNT_ID
   });

   // Rivet Events and Endpoints Go Here

   meetingsClient.endpoints.meetings.getMeeting({
      path: { meetingId: "MEETINGID" }
   }).then((response) => {
      console.log(response)
   });

   meetingsClient.webEventConsumer.event("meeting.started", (response) => {
      console.log(response.payload);
   })

   const server = await meetingsClient.start();

   console.log(`Zoom Rivet Events Server running on: ${JSON.stringify(server.address())}`);
})();

NPM:

Docs:

Sample App:

For feedback, requests, or questions please refer to the Rivet Devforum Category:

Best,
Tommy