Skip to content

Commit 14494f1

Browse files
committed
tweaked api template to avoid java8 features with java 7 config on pom file
1 parent 74cc5c0 commit 14494f1

File tree

1 file changed

+2
-2
lines changed
  • modules/swagger-codegen/src/main/resources/JavaSpring

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/JavaSpring/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public interface {{classname}} {
101101
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
102102
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
103103
method = RequestMethod.{{httpMethod}})
104-
{{#defaultInterfaces}}default {{/defaultInterfaces}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^defaultInterfaces}};{{/defaultInterfaces}}{{#defaultInterfaces}} {
104+
{{#jdk8}}{{#defaultInterfaces}}default {{/defaultInterfaces}}{{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}}{{#defaultInterfaces}} {
105105
{{#delegate-method}}
106106
return {{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
107107
}
@@ -129,7 +129,7 @@ public interface {{classname}} {
129129
{{#isDelegate}}
130130
return getDelegate().{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
131131
{{/isDelegate}}
132-
}{{/defaultInterfaces}}
132+
}{{/defaultInterfaces}}{{/jdk8}}
133133

134134
{{/operation}}
135135
}

0 commit comments

Comments
 (0)