Skip to content

Hydra spec misses schema for logout/accept (and reject) body, making the java client throw an NPE #199

Closed
@MiniDigger

Description

@MiniDigger

Preflight checklist

Describe the bug

when calling hydraClient.acceptLogoutRequest(challenge), okhttp throws an NPE (see below)
Generated code misses the content type: https://i.imgur.com/yllPIbC.png
Schema has no body for logout/accept (login has them): https://i.imgur.com/ZpuH2xA.png

Reproducing the bug

run hydraClient.acceptLogoutRequest(challenge)

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)
	at okhttp3.MediaType.parse(MediaType.kt)
	at sh.ory.hydra.ApiClient.buildRequest(ApiClient.java:1225)
	at sh.ory.hydra.ApiClient.buildCall(ApiClient.java:1181)
	at sh.ory.hydra.api.AdminApi.acceptLogoutRequestCall(AdminApi.java:449)
	at sh.ory.hydra.api.AdminApi.acceptLogoutRequestValidateBeforeCall(AdminApi.java:461)
	at sh.ory.hydra.api.AdminApi.acceptLogoutRequestWithHttpInfo(AdminApi.java:500)
	at sh.ory.hydra.api.AdminApi.acceptLogoutRequest(AdminApi.java:481)
	at io.papermc.hangarauth.controller.OAuthController.logout(OAuthController.java:229)

Relevant configuration

No response

Version

hydra java client 1.11.8

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Docker

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions