[JAVA][Spring]Optional params with delegate (#7180)

* Fixed data type for optional parameters in delegate

When generating using the delegatePattern and including an optional parameter, the api used a type of Optional<T> while the delegate used just T.  This resulted in a java error in the generated code wen trying to call one from the other.
Fixed by using correct data type in delegate

Fix #7179

* Updated samples using supplied (Windows) scripts

* Revert "Updated samples using supplied (Windows) scripts"

This reverts commit 58b9c618085ac4201cfb011def96e14caaaff3f8.
This commit is contained in:
Adam Conway 2018-01-28 19:31:47 +02:00 committed by William Cheng
parent abdc6759d3
commit d14318cf25

View File

@ -61,7 +61,7 @@ public interface {{classname}}Delegate {
/** /**
* @see {{classname}}#{{operationId}} * @see {{classname}}#{{operationId}}
*/ */
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{{dataType}}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}}, {{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}} {{>optionalDataType}} {{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}},
{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} { {{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) { if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
{{#examples}} {{#examples}}