forked from loafle/openapi-generator-original
rename and remove dead code
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package {{package}};
|
||||
|
||||
{{^java8}}
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
{{/java8}}
|
||||
import org.springframework.stereotype.Controller;
|
||||
{{^java8}}
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
{{#async}}
|
||||
import java.util.concurrent.Callable;
|
||||
{{/async}}{{/java8}}
|
||||
|
||||
{{>generatedAnnotation}}
|
||||
@Controller
|
||||
{{#operations}}
|
||||
public class {{classname}}Controller implements {{classname}} {
|
||||
{{^java8}}{{#operation}}
|
||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
|
||||
{{/hasMore}}{{/allParams}}) {
|
||||
// do some magic!{{^async}}
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);{{/async}}{{#async}}
|
||||
return new Callable<ResponseEntity<{{>returnTypes}}>>() {
|
||||
@Override
|
||||
public ResponseEntity<{{>returnTypes}}> call() throws Exception {
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
||||
}
|
||||
};{{/async}}
|
||||
}
|
||||
{{/operation}}{{/java8}}
|
||||
}
|
||||
{{/operations}}
|
||||
Reference in New Issue
Block a user