forked from loafle/openapi-generator-original
Throw Exception from controller methods
This commit is contained in:
@@ -29,7 +29,7 @@ import java.util.concurrent.Callable;
|
||||
public class {{classname}}Controller implements {{classname}} {
|
||||
{{^jdk8}}{{#operation}}
|
||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
|
||||
{{/hasMore}}{{/allParams}}) {
|
||||
{{/hasMore}}{{/allParams}}) throws Exception {
|
||||
// do some magic!{{^async}}
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);{{/async}}{{#async}}
|
||||
return new Callable<ResponseEntity<{{>returnTypes}}>>() {
|
||||
|
||||
Reference in New Issue
Block a user