# Can not generate Java client for Swagger/OpenAPI spec

**URL:** <https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201>\
**Category:** API and Webhooks\
**Created:** [July 26, 2019, 9:47am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201 "2019-07-26T09:47:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![hkyseliov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hkyseliov/32/4629_2.png) [@hkyseliov](https://devforum.zoom.us/u/hkyseliov)\
**Post date:** [July 26, 2019, 9:47am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/1 "2019-07-26T09:47:06Z")

</div>

In our test project (Spring Boot app) we would like to use Zoom API. So we tried to generate java client using:

> java -jar swagger-codegen-cli-2.4.7.jar generate -i [https://marketplace.zoom.us/docs/api-reference/zoom-api/Zoom%20API.oas2.json](https://marketplace.zoom.us/docs/api-reference/zoom-api/Zoom%20API.oas2.json) -l java

It’s generate java client, but when I build it, several compilation problem occurred, e.g.

> ```
> symbol: class object
> location: class MeetingsApi
> C:\GIT\test-app\src\main\java\io\swagger\client\api\MeetingsApi.java:1643: error: cannot find symbol
> public com.squareup.okhttp.Call meetingRegistrantQuestionUpdateCall(Integer meetingId, object body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
> ^
> 
> ```

Question: Is it possible to generate java client from “Zoom API.oas2.json”? Or may be it’s possible to use some Zoom SDK for java, to avoid using plain Unirest/OkHttp ?

Thanks,

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 26, 2019, 6:34pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/2 "2019-07-26T18:34:36Z")

</div>

Hey @hkyseliov,

We do have a [Java SDK](https://marketplace.zoom.us/docs/sdk/native-sdks/android/overview) for Android.

I will look into the issues with generating the swagger file.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![hkyseliov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hkyseliov/32/4629_2.png) [@hkyseliov](https://devforum.zoom.us/u/hkyseliov)\
**Post date:** [July 29, 2019, 8:18am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/4 "2019-07-29T08:18:58Z")

</div>

Hi @tommy, thanks for quick reply!

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [July 29, 2019, 10:21pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/5 "2019-07-29T22:21:50Z")

</div>

Hey @hkyseliov,

Can you see if this JSON works?

[https://gist.githubusercontent.com/tommygaessler/0f6fa1eeeb019ee7ac0489cb6ff20783/raw/b003f2d9a62440da06aad5c3e7069a4f977b3c58/zoom-api.json](https://gist.githubusercontent.com/tommygaessler/0f6fa1eeeb019ee7ac0489cb6ff20783/raw/b003f2d9a62440da06aad5c3e7069a4f977b3c58/zoom-api.json)

(Note: Some of the error codes may be off, as I had to change the 4 digit ones to fix the build issue.)

Let me know if this works!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![hkyseliov](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/hkyseliov/32/4629_2.png) [@hkyseliov](https://devforum.zoom.us/u/hkyseliov)\
**Post date:** [August 2, 2019, 11:40am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/7 "2019-08-02T11:40:56Z")

</div>

Hi @tommy,

thanks for your reply. We tried to generate java client from zoom-api.json you provided us, now it’s generated without 4 digits status code warnings, but sill can not generate some models for some APIs.

e.g. can not create model for meeting update, swagger codegen generate something like this:

> public void meetingUpdate(Integer meetingId, UNKNOWN\_BASE\_TYPE body, String occurrenceId) throws ApiException

the same as for:

> public InlineResponse2015 meetingCreate(String userId, UNKNOWN\_BASE\_TYPE body) throws ApiException  
> InlineResponse2017 meetingPollCreate(Integer meetingId, UNKNOWN\_BASE\_TYPE body)  
> void meetingPollUpdate(Integer meetingId, String pollId, UNKNOWN\_BASE\_TYPE body)  
> meetingRegistrantCreate(Integer meetingId, UNKNOWN\_BASE\_TYPE body, String occurrenceIds) throws ApiException

as well as for some other APIs: BillingApi, CloudRecordingApi, DashboardsApi, DevicesApi, ImChatApi, PhoneApi, ReportsApi, WebinarsApi

We tried to generate it with different tools like : [https://editor.swagger.io/](https://editor.swagger.io/), using command line cli swagger-codegen-cli-2.4.7.jar , generate from gradle project using gradle swagger codegen plugin with different versions using “java” language and different libraries(jersey1, jersey2, okhhttp etc.) but all of them generate the code with some unknown models.

Thanks,  
Hennadiy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [August 2, 2019, 8:25pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/8 "2019-08-02T20:25:16Z")

</div>

Hey @hkyseliov,

Thanks for all the details. We will work on fixing this and get back to you.

Updating with ticket `DEVELOPERS-404`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 4, 2019, 3:47pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/10 "2019-09-04T15:47:31Z")

</div>

Hey @hkyseliov,

The swagger JSON file has been fixed 🙂 give it a try!

[https://marketplace.zoom.us/docs/api-reference/zoom-api/Zoom%20API.oas2.json](https://marketplace.zoom.us/docs/api-reference/zoom-api/Zoom%20API.oas2.json)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sassy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sassy/32/1814_2.png) [@sassy](https://devforum.zoom.us/u/sassy)\
**Post date:** [September 13, 2019, 2:24am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/12 "2019-09-13T02:24:41Z")

</div>

Hello Tommy,

The API file loads properly in the Swagger editor tool, now that the extended response codes have been taken care of, but we are still seeing the same issues trying to generate java client code. Tried both Swagger and the OpenAPI codegen tools, and they both fail:

For e.g.,  
Swagger (notice the lower case object):  
object cannot be resolved to a type:  
public InlineResponse2003 accountPlanCreate(String accountId, object body) throws ApiException {

OpenAPI:  
UNKNOWN\_BASE\_TYPE cannot be resolved to a type:  
public InlineResponse2003 accountPlanCreate(String accountId, UNKNOWN\_BASE\_TYPE body) throws ApiException {

There are a bunch of other errors while generating the code as well. I can upload all of the logs if needed.

Any help is highly appreciated.

Thanks,  
-sr-

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 13, 2019, 4:59pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/13 "2019-09-13T16:59:43Z")

</div>

Hey @sassy, thanks for posting, and apologies that there are still issues with this!

Can you provide steps to reproduce those errors (how to generate java client code)?

Also if you could provide all the logs, that would be great!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sassy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sassy/32/1814_2.png) [@sassy](https://devforum.zoom.us/u/sassy)\
**Post date:** [September 17, 2019, 5:01pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/14 "2019-09-17T17:01:10Z")

</div>

Hello @tommy,

Where should I upload the logs?

Thanks,  
-sr-

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 17, 2019, 7:11pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/15 "2019-09-17T19:11:39Z")

</div>

Hey @sassy,

You could upload them at [gist.github.com](http://gist.github.com) or another cloud hosting platform and share the link here or private message it to me.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sassy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sassy/32/1814_2.png) [@sassy](https://devforum.zoom.us/u/sassy)\
**Post date:** [September 23, 2019, 9:21pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/16 "2019-09-23T21:21:43Z")

</div>

Hi @tommy,

Having trouble with gist at the moment, here you go - [https://drive.google.com/drive/folders/1x4g\_Uk5\_GtJKbn2b37d0DdbKYKXr6DWb](https://drive.google.com/drive/folders/1x4g_Uk5_GtJKbn2b37d0DdbKYKXr6DWb)

Thanks,  
-sr-

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 23, 2019, 9:39pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/17 "2019-09-23T21:39:08Z")

</div>

Thanks @sassy,

We will take a look and post back here with updates.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 2, 2019, 9:44pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/19 "2019-10-02T21:44:22Z")

</div>

Hey @sassy,

Our team looked into this, we believe your issue is related to an issue with swagger. (Although we did update our OpenAPI to fix other issues, so would be worth a shot to try again).

Can you take a look at these threads and let me know if that fixes your issue?

> <https://github.com/OpenAPITools/openapi-generator/issues/370>

> <https://github.com/OpenAPITools/openapi-generator/issues/394>

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tomas](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tomas/32/2065_2.png) [@tomas](https://devforum.zoom.us/u/tomas)\
**Post date:** [October 9, 2019, 10:49pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/21 "2019-10-09T22:49:55Z")

</div>

Hey guys,

I’m having the same issue. Using OpenAPI Generator version 4.1.3, tried both Kotlin and Java generators and both result in meetingCreate() having “UNKNOWN\_BASE\_TYPE body” as a parameter.

Using Zoom API spec downloaded a day ago.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 10, 2019, 12:02am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/22 "2019-10-10T00:02:52Z")

</div>

Hey @tomas, thanks for reaching out and using Zoom!

We are looking into this and will post back with an update.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sassy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sassy/32/1814_2.png) [@sassy](https://devforum.zoom.us/u/sassy)\
**Post date:** [October 23, 2019, 5:11am UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/24 "2019-10-23T05:11:12Z")

</div>

@tommy, I don’t think either of the links you posted are the solution to this problem. I am using a later version that supposed to have fixed a similar looking error message.

Thanks,  
-sr-

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 23, 2019, 3:49pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/25 "2019-10-23T15:49:20Z")

</div>

Thanks @sassy,

We will work on fixing this asap. JIRA: DEVELOPERS-404

-Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [November 11, 2019, 9:31pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/26 "2019-11-11T21:31:17Z")

</div>

Hey @sassy, @tomas, @hkyseliov,

We have updated the Java Client Library:

> **[java.zip](https://drive.google.com/file/d/1H5S9sPj8Gm_Wf9bQZr9cjmDRn1ToWQc_/view?usp=drive_open)**
>
> Google Drive file.

And the updated Open API JSON:

> **[openapi.zip](https://drive.google.com/file/d/1Gw8bUJfeQNc_en-xY72I9Dec9WjFBE-T/view?usp=drive_open)**
>
> Google Drive file.

Let me know if this works for you all! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![sassy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sassy/32/1814_2.png) [@sassy](https://devforum.zoom.us/u/sassy)\
**Post date:** [November 11, 2019, 9:33pm UTC](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201/27 "2019-11-11T21:33:42Z")

</div>

will check this out and get back to you.

thanks, @tommy.

[Next page](https://devforum.zoom.us/t/can-not-generate-java-client-for-swagger-openapi-spec/5201.md?page=2)
