-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Only enable Spring default interface for java8
#3022
Only enable Spring default interface for java8
#3022
Conversation
I would be in favor of an extra-option |
It might be better if version 8.0 is the default and basic version now ? |
e8b5c01
to
079c243
Compare
OK, I've changed the PR to add an additional option instead. It would be easy to reuse if |
079c243
to
f4036c0
Compare
@eriktim can you please resolve the merge conflicts when you've time? |
cc @bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) |
8237c67
to
7fc341a
Compare
docs/generators/spring.md
Outdated
@@ -48,6 +48,7 @@ sidebar_label: spring | |||
|interfaceOnly|Whether to generate only API interface stubs without the server files.| |false| | |||
|delegatePattern|Whether to generate the server files using the delegate pattern| |false| | |||
|singleContentTypes|Whether to select only one produces/consumes content-type by operation.| |false| | |||
|skipDefaultInterface|Wether to generate default implementations for java8 interfaces| |false| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Wether/Whether/
@@ -117,6 +119,7 @@ public SpringCodegen() { | |||
cliOptions.add(CliOption.newBoolean(DELEGATE_PATTERN, "Whether to generate the server files using the delegate pattern", delegatePattern)); | |||
cliOptions.add(CliOption.newBoolean(SINGLE_CONTENT_TYPES, "Whether to select only one produces/consumes content-type by operation.", singleContentTypes)); | |||
updateJava8CliOptions(); | |||
cliOptions.add(CliOption.newBoolean(SKIP_DEFAULT_INTERFACE, "Wether to generate default implementations for java8 interfaces", skipDefaultInterface)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Wether/Whether/
7fc341a
to
a8b91c1
Compare
Sorry please resolve the merge conflicts one more time. I'll hold on other Spring PRs for the time being. |
cb80484
to
196f33f
Compare
Done. Is something still holding this back or can it be merged? |
It can be merged. |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
Fixes #2984.
The documentation of the
java8
option describes it can be used to generate default interfaces. I therefore took the approach not to generate default interfaces when you don't explicitly set thejava8
option. To me this feels the most natural. Please let me know if you prefer to add an extra option for this.cc @diyfr