Can not generate Java client for Swagger/OpenAPI spec

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 -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,

Hey @hkyseliov,

We do have a Java SDK for Android.

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

Thanks,
Tommy

Hi @tommy, thanks for quick reply!

Hey @hkyseliov,

Can you see if this JSON works?

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

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/, 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

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