[java-spring] - library spring-http-interface create swagger annotations if not explicitly configured to not do#23073
Conversation
fbafb8d to
43bccd0
Compare
43bccd0 to
5379370
Compare
Thanks for the PR. I did a test with the following and the output compiles: Am I repeating the issue correctly? |
5379370 to
3355914
Compare
3355914 to
652a20d
Compare
Thank you for following up @wing328 I have only used the generator from maven plugin. I tried to recreate the error from the CLI without success. If you create a maven project with this pom and run mvn compile, you will get the error. The workaround is to uncomment the two lines commented out. |
|
I remember this being problematic also when used with the gradle plugin. |
Chrimle
left a comment
There was a problem hiding this comment.
Looks great ❤️
it matches what the docs say about the annotationLibrary:
as well as about documentationProvider:
using the plugin, i could repeat the issue and confirmed the fix |
When using spring generator with library=spring-http-interface it generates client code that should not have swagger annotations. But it's created anyaway, and without imports, so they wont even compile.
The implementation for this was trying to set documentationProvider and annotationLibrary to none but got a bug, so additionalParameters already got values set for documentationProvider and annotationLibrary unless you specifically configure documentationProvider=none and annotationLibrary=none
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)Summary by cubic
Stop generating Swagger/SpringDoc annotations for Spring HTTP Interface to prevent compile errors. Forces docs/annotations to NONE, ignores user config, and defaults to Jakarta EE for this library.
Bug Fixes
Migration
Written for commit 652a20d. Summary will update on new commits.