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

Swagger Generator does not use the jdk configured in the javaToolchain #84

Open
cgrabmann opened this issue Aug 23, 2022 · 0 comments
Open

Comments

@cgrabmann
Copy link
Contributor

The task 'clfGenerateSwaggerDocumentation' uses the installed jdk instead of the one configured with the javaToolchain.

Because of that the generation fails if the installed jdk is older then the one configured in the javaToolchain, since it loads the generated classes directly into the gradle process.
This leads to the following error:

Caused by: java.lang.UnsupportedClassVersionError: io/cloudflight/api/model/Model has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Evaluate if it is possible to run this task in a separate thread that uses the javaToolchain jdk instead of the "default" installed one.
Maybe contribute it directly to the original swagger doc generation plugin: https://github.com/gigaSproule/swagger-gradle-plugin

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

No branches or pull requests

1 participant