-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[BUG] Java Spring snapshotVersion not working with Maven plugin. #4468
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
Labels
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
5 tasks
PR #4495 fixes this. Made use of a previous fix that was already applied to the kotlin generation. |
wing328
pushed a commit
that referenced
this issue
Nov 17, 2019
jimschubert
added a commit
to jimschubert/openapi-generator
that referenced
this issue
Nov 17, 2019
…ulti-level-model-hierarchy * origin/master: minor fix to CI failure feat(dart-dio): correctly handle Map<String, Object>, List<Object> using JsonObject (OpenAPITools#4401) [OCAML] Fixes cloud.drone.io ocaml-test (OpenAPITools#4501) [elm] Add support for oneOf (OpenAPITools#4434) [BUG] [Java] Client resttemplate and webclient. Form Params are badly added when they are lists (OpenAPITools#4461) fix: prevent ClassCastException when handling options of (issue OpenAPITools#4468) (OpenAPITools#4495) Fixes Python client Configuration class so each instance uses its own dicts (OpenAPITools#4485)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
Description
Using the openapi-generator-maven-plugin version 4.2.0, the Java spring generator does not honor the snapshotVersion parameter as documented.
From the help:
POM Configuration:
results in an exception:
Changing the value to "1.0.0-SNAPSHOT" does not cause an error, but the version is not used in the generated POM
CLI seems to generate the POM file as expected using command line
openapi-generator generate -i ./openapi.yaml -o ./tmp -g spring -p snapshotVersion=true
openapi-generator version
4.2.0
OpenAPI declaration file content or url
Any spec will cause this
Command line used for generation
Maven generation, JavaSpring
Steps to reproduce
Create a
pom.xml
file with this in the plugins sectionRelated issues/PRs
Suggest a fix
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java#L1058
This line needs to be modified to check for a Boolean type and not cast as String if so. If all incoming types are non primitives, then using .toString() may be the easiest.
The text was updated successfully, but these errors were encountered: