1+ /**
2+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) ({ {{generatorVersion} }}).
3+ * https://openapi-generator.tech
4+ * Do not edit the class manually.
5+ */
6+ package { {package} };
7+
8+ { {#imports} }import { {import} };
9+ { {/imports} }
10+ import io.swagger.annotations.*;
11+ { {#jdk8-no-delegate} }
12+ { {#virtualService} }
13+ import io.virtualan.annotation.ApiVirtual;
14+ import io.virtualan.annotation.VirtualService;
15+ { {/virtualService} }
16+ import org.springframework.http.HttpStatus;
17+ import org.springframework.http.MediaType;
18+ { {/jdk8-no-delegate} }
19+ import org.springframework.http.ResponseEntity;
20+ { {#useBeanValidation} }
21+ import org.springframework.validation.annotation.Validated;
22+ { {/useBeanValidation} }
23+ import org.springframework.web.bind.annotation.PathVariable;
24+ import org.springframework.web.bind.annotation.RequestBody;
25+ import org.springframework.web.bind.annotation.RequestHeader;
26+ import org.springframework.web.bind.annotation.RequestMapping;
27+ import org.springframework.web.bind.annotation.RequestMethod;
28+ import org.springframework.web.bind.annotation.RequestParam;
29+ import org.springframework.web.bind.annotation.RequestPart;
30+ { {#jdk8-no-delegate} }
31+ { {^reactive} }
32+ import org.springframework.web.context.request.NativeWebRequest;
33+ { {/reactive} }
34+ { {/jdk8-no-delegate} }
35+ import org.springframework.web.multipart.MultipartFile;
36+ { {#reactive} }
37+ import org.springframework.web.server.ServerWebExchange;
38+ import reactor.core.publisher.Flux;
39+ import reactor.core.publisher.Mono;
40+ { {/reactive} }
41+
42+ { {#useBeanValidation} }
43+ import javax.validation.Valid;
44+ import javax.validation.constraints.*;
45+ { {/useBeanValidation} }
46+ import java.util.List;
47+ import java.util.Map;
48+ { {#jdk8-no-delegate} }
49+ import java.util.Optional;
50+ { {/jdk8-no-delegate} }
51+ { {^jdk8-no-delegate} }
52+ { {#useOptional} }
53+ import java.util.Optional;
54+ { {/useOptional} }
55+ { {/jdk8-no-delegate} }
56+ { {#async} }
57+ import java.util.concurrent.{ {^jdk8} }Callable{ {/jdk8} }{ {#jdk8} }CompletableFuture{ {/jdk8} };
58+ { {/async} }
59+ { {> generatedAnnotation} }
60+ { {#useBeanValidation} }
61+ @Validated
62+ { {/useBeanValidation} }
63+ @Api(value = "{ {{baseName} }}", description = "the { {{baseName} }} API")
64+ { {#operations} }
65+ { {#virtualService} }
66+ @VirtualService
67+ { {/virtualService} }
68+ public interface { {classname} } {
69+ {{#jdk8} }
70+ { {^isDelegate} }
71+ { {^reactive} }
72+
73+ default Optional<NativeWebRequest > getRequest() {
74+ return Optional.empty();
75+ }
76+ { {/reactive} }
77+ { {/isDelegate} }
78+ { {#isDelegate} }
79+
80+ default { {classname} }Delegate getDelegate() {
81+ return new {{classname} }Delegate() { } ;
82+ }
83+ { {/isDelegate} }
84+ { {/jdk8} }
85+ { {#operation} }
86+
87+ { {#virtualService} }
88+ @ApiVirtual
89+ { {/virtualService} }
90+ @ApiOperation(value = "{ {{summary} }}", nickname = "{ {{operationId} }}", notes = "{ {{notes} }}"{ {#returnBaseType} }, response = { {{returnBaseType} }}.class{ {/returnBaseType} }{ {#returnContainer} }, responseContainer = "{ {{returnContainer} }}"{ {/returnContainer} }{ {#hasAuthMethods} }, authorizations = {
91+ {{#authMethods} }@Authorization(value = "{ {name} }"{ {#isOAuth} }, scopes = {
92+ {{#scopes} }@AuthorizationScope(scope = "{ {scope} }", description = "{ {description} }"){ {#hasMore} },
93+ { {/hasMore} }{ {/scopes} }
94+ }{ {/isOAuth} }){ {#hasMore} },
95+ { {/hasMore} }{ {/authMethods} }
96+ }{ {/hasAuthMethods} }, tags={ {{#vendorExtensions.x-tags} }"{ {tag} }",{ {/vendorExtensions.x-tags} } })
97+ @ApiResponses(value = { {{#responses} }
98+ @ApiResponse(code = { {{code} }}, message = "{ {{message} }}"{ {#baseType} }, response = { {{baseType} }}.class{ {/baseType} }{ {#containerType} }, responseContainer = "{ {{containerType} }}"{ {/containerType} }){ {#hasMore} },{ {/hasMore} }{ {/responses} } })
99+ { {#implicitHeaders} }
100+ @ApiImplicitParams({
101+ {{#headerParams} }
102+ { {> implicitHeader} }
103+ { {/headerParams} }
104+ })
105+ { {/implicitHeaders} }
106+ @RequestMapping(value = "{ {{path} }}",{ {#singleContentTypes} }{ {#hasProduces} }
107+ produces = "{ {{vendorExtensions.x-accepts} }}", { {/hasProduces} }{ {#hasConsumes} }
108+ consumes = "{ {{vendorExtensions.x-contentType} }}",{ {/hasConsumes} }{ {/singleContentTypes} }{ {^singleContentTypes} }{ {#hasProduces} }
109+ produces = { {{#produces} }"{ {{mediaType} }}"{ {#hasMore} }, { {/hasMore} }{ {/produces} } }, { {/hasProduces} }{ {#hasConsumes} }
110+ consumes = { {{#consumes} }"{ {{mediaType} }}"{ {#hasMore} }, { {/hasMore} }{ {/consumes} } },{ {/hasConsumes} }{ {/singleContentTypes} }
111+ method = RequestMethod.{ {httpMethod} })
112+ { {#jdk8} }default { {/jdk8} }{ {#responseWrapper} }{ {.} }<{ {/responseWrapper} }ResponseEntity<{ {> returnTypes} }>{ {#responseWrapper} }>{ {/responseWrapper} } { {#delegate-method} }_{ {/delegate-method} }{ {operationId} }({ {#allParams} }{ {> queryParams} }{ {> pathParams} }{ {> headerParams} }{ {> bodyParams} }{ {> formParams} }{ {#hasMore} },{ {/hasMore} }{ {^hasMore} }{ {#reactive} }, { {/reactive} }{ {/hasMore} }{ {/allParams} }{ {#reactive} }ServerWebExchange exchange{ {/reactive} }){ {^jdk8} };{ {/jdk8} }{ {#jdk8} } {
113+ {{#delegate-method} }
114+ return { {operationId} }({ {#allParams} }{ {paramName} }{ {#hasMore} }, { {/hasMore} }{ {/allParams} }{ {#reactive} }{ {#hasParams} }, { {/hasParams} }exchange{ {/reactive} });
115+ }
116+
117+ // Override this method
118+ { {#jdk8} }default { {/jdk8} } { {#responseWrapper} }{ {.} }<{ {/responseWrapper} }ResponseEntity<{ {> returnTypes} }>{ {#responseWrapper} }>{ {/responseWrapper} } { {operationId} }({ {#allParams} }{ {^isFile} }{ {^isBodyParam} }{ {> optionalDataType} }{ {/isBodyParam} }{ {#isBodyParam} }{ {^reactive} }{ {{dataType} }}{ {/reactive} }{ {#reactive} }{ {^isListContainer} }Mono{ {/isListContainer} }{ {#isListContainer} }Flux{ {/isListContainer} }<{ {{baseType} }}>{ {/reactive} }{ {/isBodyParam} }{ {/isFile} }{ {#isFile} }MultipartFile{ {/isFile} } { {paramName} }{ {#hasMore} }, { {/hasMore} }{ {/allParams} }{ {#reactive} }{ {#hasParams} }, { {/hasParams} }ServerWebExchange exchange{ {/reactive} }) {
119+ {{/delegate-method} }
120+ { {^isDelegate} }
121+ { {> methodBody} }
122+ { {/isDelegate} }
123+ { {#isDelegate} }
124+ return getDelegate().{ {operationId} }({ {#allParams} }{ {paramName} }{ {#hasMore} }, { {/hasMore} }{ {/allParams} }{ {#reactive} }{ {#hasParams} }, { {/hasParams} }exchange{ {/reactive} });
125+ { {/isDelegate} }
126+ }{ {/jdk8} }
127+
128+ { {/operation} }
129+ }
130+ { {/operations} }
0 commit comments