mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 02:57:10 +00:00
* java 8 interface only delegate method mode * typo correction * Update samples with ./bin/spring-all-petstore.sh * change delegate prefix to "do" and make delegate method a default method that returns an OK status code * remove temp debug printout * prefix spring annotated method with "_" to indicate that is private * resolve merge issues from Merge of remote-tracking branch 'upstream/master' * tuned whitespace in api.mustache and re-ran spring-all-petstore.sh * removed special spring cloud library check as it was no longer being referenced in api.mustache re-ran spring-all-petstore.sh
This commit is contained in:
committed by
William Cheng
parent
cccef5dbc3
commit
ad7a8200f0
@@ -100,7 +100,14 @@ public interface {{classname}} {
|
||||
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
||||
method = RequestMethod.{{httpMethod}})
|
||||
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
||||
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{#delegate-method}}_{{/delegate-method}}{{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
||||
{{#delegate-method}}
|
||||
return {{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
}
|
||||
|
||||
// Override this method
|
||||
default {{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{^isFile}}{{{dataType}}}{{/isFile}}{{#isFile}}MultipartFile{{/isFile}} {{paramName}}{{#hasMore}},{{/hasMore}}{{/allParams}}) {
|
||||
{{/delegate-method}}
|
||||
{{^isDelegate}}
|
||||
if(getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
|
||||
{{#examples}}
|
||||
@@ -125,4 +132,4 @@ public interface {{classname}} {
|
||||
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
{{/operations}}
|
||||
Reference in New Issue
Block a user