Open tprus opened 1 year ago
Thank you I will add this to the edits.
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
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)
I will continue looking into this one and bump up the pom
Any progress?
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
Same problem with getting one app by id (AppsApi).
shame
Listing groups not working at all:
Exception in thread "main" java.lang.IllegalArgumentException: The field
pagination
in the JSON string is not defined in theGetGroups200Response
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)GroupsApi groupsApi = new GroupsApi(defaultClient); List groups = groupsApi.getGroups().getData();
if (groups != null) {
for (Group group : groups) {
System.out.println(group.toString());
}
}