forked from loafle/openapi-generator-original
Make interface default methods return Not Implemented
When using JDK8 and generating default interface method implementations, return HTTP 501 Not Implemented rather than 200 OK by default. (#5895)
This commit is contained in:
parent
d35239c661
commit
171151f91e
@ -56,7 +56,7 @@ public interface {{classname}} {
|
||||
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}} {
|
||||
// do some magic!
|
||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.NOT_IMPLEMENTED){{#async}}){{/async}};
|
||||
}{{/jdk8}}
|
||||
|
||||
{{/operation}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user