-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[Java] Missing dependency on generated project on build.sbt #1605
Comments
@deigote thanks for reporting the issue. May I know if you've time to contribute a fix by submitting a PR? |
I can try. Can you point me to the relevant modules or classes where I could start looking at? |
It would be great if it was working like this, but sadly the included dependencies are only included in the templates with some if-else mustache templates. And we also have a lot of copy paste between the templates for the different java libs we support. For feign, it is OK:
openapi-generator/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache Lines 271 to 275 in cd61442
If you look at the same in the Lines 11 to 25 in cd61442
|
@deigote I hope my explanations are clear enough, if not feel free to ask for more... |
@jmini they are! I'll try to submit a PR over the weekend, thanks. |
Description
When generating code for my spec using Java and no other option, the SBT build file is missing a dependency.
The dependency seems to be present in gradle and pom build files. Adding it manually to build.sbt (
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1"
) fixes the issue.openapi-generator version
I'm using
docker
imageopenapitools/openapi-generator-cli:v3.3.4
.OpenAPI declaration file content or url
I think any spec will do. Here one I quickly compiled for testing the issue:
Command line used for generation
Steps to reproduce
Suggest a fix/enhancement
I guess it's a matter of including the missing dependency in the build.sbt file. I'm surprised the dependency is there for pom and gradle, I would have assumed that each build file is generated from a common set of data, including the dependencies. So maybe it's something else.
The text was updated successfully, but these errors were encountered: