Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump java clients openapi-generator to 6.0.0 #192

Conversation

lrenard-qima
Copy link

@lrenard-qima lrenard-qima commented Jun 21, 2022

Context :
A bug has been fixed in the release 6.0.0 of openapi-generator.
It fixes a NPE when trying to perform a PUT with an empty body while using the ApiClient generated with openapi-generator.
Link to the fix on openapi-generator : OpenAPITools/openapi-generator#12172

In my case I am having this error when calling Hydra Admin API to accept logout request. It is building a PUT request with an empty body and it ends up with a NPE.

Idea is to upgrade openapi-generator version to include the fix in generated ory/hydra-client-java.

For a more detailed overview of the bug I have created a ticket on ory/sdk repository that is mentionent below (in Related Issue or Design Document part)

BREAKING CHANGES: 

This patch bumps the version of openapi-generator used to generate Java clients from 5.4.0 to 6.0.0.

Related Issue or Design Document

Linked to bug ticket on ory/sdk : #191

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security
    vulnerability, I confirm that I got green light (please contact security@ory.sh) from the
    maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation within the code base (if appropriate).

Further comments

@aeneasr
Copy link
Member

aeneasr commented Jun 21, 2022

Thank you! :) Are there breaking changes in the 6.0 generate that we need to be aware of?

@lrenard-qima
Copy link
Author

lrenard-qima commented Jun 21, 2022

Thank you! :) Are there breaking changes in the 6.0 generate that we need to be aware of?

You are welcome =)
I have not investigated it enough. I leave the PR as a draft while I check that :)

@aeneasr
Copy link
Member

aeneasr commented Jun 21, 2022

Great, thanks!

@aeneasr
Copy link
Member

aeneasr commented Jun 22, 2022

Hi, I'm just echoing my message from slack:

Hi Lucas, thank you! I think the info that they fixed an important bug is enough for me to get it merged 🙂 For breaking changes, you can also always look at the release change log from open api generator itself: https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.0.0#java

Screenshot 2022-06-22 at 10 22 34

One last thing we need to do though is that we probably need to update the dependencies to match the 6.0 generator here: https://github.com/ory/sdk/tree/master/contrib/poms

When I upgraded to 5.4.0 these were the changes I had to make (please only look at the POM changes):

303c725

Regarding the question you had on slack, mix is from elixir so if you don't have it installed that will fail. A better option is to use what is written in the README:

https://github.com/ory/sdk#debugging-failing-circleci-tests

This will generate the code in your local file system!

@geetparekh
Copy link

Hello,

Curious as to in which version will the fix be available. We are also facing the same issue when calling Hydra Admin API to accept logout request. Thank you!

@aeneasr
Copy link
Member

aeneasr commented Oct 24, 2022

We updated the java generator

@aeneasr aeneasr closed this Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants