You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] ApiClient.buildRequest using PUT method with no request body leads to exception #14
Since Hydra ApiClient is generated, it would certainly fix the issue to upgrade to fixed openapi version and generate new ApiClient.
Breaks in sh.ory.hydra.ApiClient line 1251 at :
// use an empty request body (for POST, PUT and PATCH)
reqBody = RequestBody.create("", MediaType.parse(contentType));
Reproducing the bug
Steps to reproduce :
Create Java project using hydra-client-java
Create a Hydra AdminApi using ApiClient
Call AdminApi acceptLogoutRequest
=> It breaks
Relevant log output
java.lang.NullPointerException: Parameter specified as non-null is null: method okhttp3.MediaType$Companion.parse, parameter $this$toMediaTypeOrNull
at okhttp3.MediaType$Companion.parse(MediaType.kt) ~[okhttp-4.9.3.jar:na]
at okhttp3.MediaType.parse(MediaType.kt) ~[okhttp-4.9.3.jar:na]
at sh.ory.hydra.ApiClient.buildRequest(ApiClient.java:1225) ~[hydra-client-1.11.7.jar:na]
at sh.ory.hydra.ApiClient.buildCall(ApiClient.java:1181) ~[hydra-client-1.11.7.jar:na]
at sh.ory.hydra.api.AdminApi.acceptLogoutRequestCall(AdminApi.java:449) ~[hydra-client-1.11.7.jar:na]
at sh.ory.hydra.api.AdminApi.acceptLogoutRequestValidateBeforeCall(AdminApi.java:461) ~[hydra-client-1.11.7.jar:na]
at sh.ory.hydra.api.AdminApi.acceptLogoutRequestWithHttpInfo(AdminApi.java:500) ~[hydra-client-1.11.7.jar:na]
at sh.ory.hydra.api.AdminApi.acceptLogoutRequest(AdminApi.java:481) ~[hydra-client-1.11.7.jar:na]
Relevant configuration
No response
Version
1.11.7
On which operating system are you observing this issue?
I can confirm that this bug exists, i ran into the same issue adminApi.acceptLogoutRequest("asdhasidasd");
Fails immediately, which means we need to keep the version down
Activity
xkuyax commentedon Jun 29, 2022
I can confirm that this bug exists, i ran into the same issue
adminApi.acceptLogoutRequest("asdhasidasd");Fails immediately, which means we need to keep the version down
aeneasr commentedon Jul 4, 2022
Thank you for the report! There is an open PR to upgrade the java client to 6.0 but it is currently still work in progress: ory/sdk#192
CGNonofr commentedon Nov 22, 2022
It seems that the issue is now fixed
aeneasr commentedon Nov 22, 2022
aweseome!