onelogin / onelogin-java-sdk

5 stars 13 forks source link

The field `pagination` in the JSON string is not defined in the `GetGroups200Response` properties #62

Open tprus opened 1 year ago

tprus commented 1 year ago

Listing groups not working at all:

Exception in thread "main" java.lang.IllegalArgumentException: The field pagination in the JSON string is not defined in the GetGroups200Response properties. JSON: {"status":{"error":false,"code":200,"type":"success","message":"Success"},"pagination":{"before_cursor":null,"after_cursor":null,"previous_link":null,"next_link":null},"data":[{"id":502836,"name":"test","reference":null}]} at com.onelogin.client.model.GetGroups200Response.validateJsonObject(GetGroups200Response.java:189) at com.onelogin.client.model.GetGroups200Response$CustomTypeAdapterFactory$1.read(GetGroups200Response.java:233) at com.onelogin.client.model.GetGroups200Response$CustomTypeAdapterFactory$1.read(GetGroups200Response.java:223) at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199) at com.google.gson.Gson.fromJson(Gson.java:963) at com.google.gson.Gson.fromJson(Gson.java:928) at com.google.gson.Gson.fromJson(Gson.java:877) at com.onelogin.client.JSON.deserialize(JSON.java:325) at com.onelogin.client.ApiClient.deserialize(ApiClient.java:989) at com.onelogin.client.ApiClient.handleResponse(ApiClient.java:1199) at com.onelogin.client.ApiClient.execute(ApiClient.java:1123) at com.onelogin.client.api.GroupsApi.getGroupsWithHttpInfo(GroupsApi.java:309) at com.onelogin.client.api.GroupsApi.getGroups(GroupsApi.java:289)

com.onelogin onelogin-java-sdk 3.1.1

GroupsApi groupsApi = new GroupsApi(defaultClient); List groups = groupsApi.getGroups().getData(); if (groups != null) { for (Group group : groups) { System.out.println(group.toString()); } }

Jmfwolf commented 1 year ago

Thank you I will add this to the edits.

Jmfwolf commented 1 year ago

Please let me know how the newest release works for you, both issues have been addressed in this release: https://github.com/onelogin/onelogin-java-sdk/releases/tag/3.1.2

tprus commented 1 year ago

Still the same error:

Exception in thread "main" java.lang.IllegalArgumentException: The field pagination in the JSON string is not defined in the GetGroups200Response properties. JSON: {"status":{"error":false,"code":200,"type":"success","message":"Success"},"pagination":{"before_cursor":null,"after_cursor":null,"previous_link":null,"next_link":null},"data":[{"id":502836,"name":"test","reference":null}]} at com.onelogin.client.model.GetGroups200Response.validateJsonObject(GetGroups200Response.java:191) at com.onelogin.client.model.GetGroups200Response$CustomTypeAdapterFactory$1.read(GetGroups200Response.java:235) at com.onelogin.client.model.GetGroups200Response$CustomTypeAdapterFactory$1.read(GetGroups200Response.java:225) at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199) at com.google.gson.Gson.fromJson(Gson.java:963) at com.google.gson.Gson.fromJson(Gson.java:928) at com.google.gson.Gson.fromJson(Gson.java:877) at com.onelogin.client.JSON.deserialize(JSON.java:324) at com.onelogin.client.ApiClient.deserialize(ApiClient.java:990) at com.onelogin.client.ApiClient.handleResponse(ApiClient.java:1200) at com.onelogin.client.ApiClient.execute(ApiClient.java:1124) at com.onelogin.client.api.GroupsApi.getGroupsWithHttpInfo(GroupsApi.java:309) at com.onelogin.client.api.GroupsApi.getGroups(GroupsApi.java:289)

Jmfwolf commented 1 year ago

I will continue looking into this one and bump up the pom

tprus commented 1 year ago

Any progress?

Jmfwolf commented 1 year ago

I am pretty issue has to do with the generators handling of the Null value. I have been bouncing between repos, but this is prioritized. I will keep you up to date

tprus commented 1 year ago

Same problem with getting one app by id (AppsApi).

tprus commented 9 months ago

shame