forked from loafle/openapi-generator-original
Remove JDK7 support from Java Spring generators (#11561)
* remove jdk8 support from spring generators * update tests, remove commented code in AbstractJavaCodegen * add back implementation * add back import * generate code for non reactive
This commit is contained in:
@@ -23,6 +23,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "another-fake", description = "the another-fake API")
|
||||
public interface AnotherFakeApi {
|
||||
|
||||
default AnotherFakeApiDelegate getDelegate() {
|
||||
return new AnotherFakeApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH /another-fake/dummy : To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
@@ -46,8 +50,10 @@ public interface AnotherFakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> call123testSpecialTags(
|
||||
default ResponseEntity<Client> call123testSpecialTags(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
) {
|
||||
return getDelegate().call123testSpecialTags(body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -12,13 +16,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -29,7 +34,12 @@ public class AnotherFakeApiController implements AnotherFakeApi {
|
||||
private final AnotherFakeApiDelegate delegate;
|
||||
|
||||
public AnotherFakeApiController(@Autowired(required = false) AnotherFakeApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new AnotherFakeApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnotherFakeApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -15,6 +19,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface AnotherFakeApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH /another-fake/dummy : To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
@@ -23,6 +31,18 @@ public interface AnotherFakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see AnotherFakeApi#call123testSpecialTags
|
||||
*/
|
||||
ResponseEntity<Client> call123testSpecialTags(Client body);
|
||||
default ResponseEntity<Client> call123testSpecialTags(Client body) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"client\" : \"client\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,6 +33,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "fake", description = "the fake API")
|
||||
public interface FakeApi {
|
||||
|
||||
default FakeApiDelegate getDelegate() {
|
||||
return new FakeApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/create_xml_item : creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
@@ -54,9 +58,11 @@ public interface FakeApi {
|
||||
value = "/fake/create_xml_item",
|
||||
consumes = { "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }
|
||||
)
|
||||
ResponseEntity<Void> createXmlItem(
|
||||
default ResponseEntity<Void> createXmlItem(
|
||||
@ApiParam(value = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem
|
||||
);
|
||||
) {
|
||||
return getDelegate().createXmlItem(xmlItem);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -81,9 +87,11 @@ public interface FakeApi {
|
||||
value = "/fake/outer/boolean",
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<Boolean> fakeOuterBooleanSerialize(
|
||||
default ResponseEntity<Boolean> fakeOuterBooleanSerialize(
|
||||
@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body
|
||||
);
|
||||
) {
|
||||
return getDelegate().fakeOuterBooleanSerialize(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -108,9 +116,11 @@ public interface FakeApi {
|
||||
value = "/fake/outer/composite",
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(
|
||||
default ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(
|
||||
@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body
|
||||
);
|
||||
) {
|
||||
return getDelegate().fakeOuterCompositeSerialize(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -135,9 +145,11 @@ public interface FakeApi {
|
||||
value = "/fake/outer/number",
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<BigDecimal> fakeOuterNumberSerialize(
|
||||
default ResponseEntity<BigDecimal> fakeOuterNumberSerialize(
|
||||
@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body
|
||||
);
|
||||
) {
|
||||
return getDelegate().fakeOuterNumberSerialize(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -162,9 +174,11 @@ public interface FakeApi {
|
||||
value = "/fake/outer/string",
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<String> fakeOuterStringSerialize(
|
||||
default ResponseEntity<String> fakeOuterStringSerialize(
|
||||
@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) String body
|
||||
);
|
||||
) {
|
||||
return getDelegate().fakeOuterStringSerialize(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -188,9 +202,11 @@ public interface FakeApi {
|
||||
value = "/fake/body-with-file-schema",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithFileSchema(
|
||||
default ResponseEntity<Void> testBodyWithFileSchema(
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody FileSchemaTestClass body
|
||||
);
|
||||
) {
|
||||
return getDelegate().testBodyWithFileSchema(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -214,10 +230,12 @@ public interface FakeApi {
|
||||
value = "/fake/body-with-query-params",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithQueryParams(
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
) {
|
||||
return getDelegate().testBodyWithQueryParams(query, body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -243,9 +261,11 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> testClientModel(
|
||||
default ResponseEntity<Client> testClientModel(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
) {
|
||||
return getDelegate().testClientModel(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -287,7 +307,7 @@ public interface FakeApi {
|
||||
value = "/fake",
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testEndpointParameters(
|
||||
default ResponseEntity<Void> testEndpointParameters(
|
||||
@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
|
||||
@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,
|
||||
@ApiParam(value = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
|
||||
@@ -302,7 +322,9 @@ public interface FakeApi {
|
||||
@ApiParam(value = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@ApiParam(value = "None") @Valid @RequestPart(value = "password", required = false) String password,
|
||||
@ApiParam(value = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback
|
||||
);
|
||||
) {
|
||||
return getDelegate().testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -335,7 +357,7 @@ public interface FakeApi {
|
||||
value = "/fake",
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testEnumParameters(
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@ApiParam(value = "Header parameter enum test (string array)", allowableValues = ">, $") @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@ApiParam(value = "Header parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@@ -344,7 +366,9 @@ public interface FakeApi {
|
||||
@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1.1, -1.2") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@ApiParam(value = "Form parameter enum test (string array)", allowableValues = ">, $") @Valid @RequestPart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@ApiParam(value = "Form parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
|
||||
);
|
||||
) {
|
||||
return getDelegate().testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -372,14 +396,16 @@ public interface FakeApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/fake"
|
||||
)
|
||||
ResponseEntity<Void> testGroupParameters(
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @ApiParam(value = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@ApiParam(value = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @ApiParam(value = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@ApiParam(value = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@ApiParam(value = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@ApiParam(value = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
);
|
||||
) {
|
||||
return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -402,9 +428,11 @@ public interface FakeApi {
|
||||
value = "/fake/inline-additionalProperties",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testInlineAdditionalProperties(
|
||||
default ResponseEntity<Void> testInlineAdditionalProperties(
|
||||
@ApiParam(value = "request body", required = true) @Valid @RequestBody Map<String, String> param
|
||||
);
|
||||
) {
|
||||
return getDelegate().testInlineAdditionalProperties(param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -428,10 +456,12 @@ public interface FakeApi {
|
||||
value = "/fake/jsonFormData",
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testJsonFormData(
|
||||
default ResponseEntity<Void> testJsonFormData(
|
||||
@ApiParam(value = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,
|
||||
@ApiParam(value = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2
|
||||
);
|
||||
) {
|
||||
return getDelegate().testJsonFormData(param, param2);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -458,13 +488,15 @@ public interface FakeApi {
|
||||
method = RequestMethod.PUT,
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
);
|
||||
) {
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -497,10 +529,12 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@ApiParam(value = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
|
||||
@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
);
|
||||
) {
|
||||
return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ import java.time.OffsetDateTime;
|
||||
import org.openapitools.model.OuterComposite;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -22,13 +26,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -39,7 +44,12 @@ public class FakeApiController implements FakeApi {
|
||||
private final FakeApiDelegate delegate;
|
||||
|
||||
public FakeApiController(@Autowired(required = false) FakeApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new FakeApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public FakeApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,11 +11,15 @@ import java.time.OffsetDateTime;
|
||||
import org.openapitools.model.OuterComposite;
|
||||
import org.openapitools.model.User;
|
||||
import org.openapitools.model.XmlItem;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -25,6 +29,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface FakeApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/create_xml_item : creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
@@ -33,7 +41,10 @@ public interface FakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#createXmlItem
|
||||
*/
|
||||
ResponseEntity<Void> createXmlItem(XmlItem xmlItem);
|
||||
default ResponseEntity<Void> createXmlItem(XmlItem xmlItem) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/outer/boolean
|
||||
@@ -43,7 +54,10 @@ public interface FakeApiDelegate {
|
||||
* @return Output boolean (status code 200)
|
||||
* @see FakeApi#fakeOuterBooleanSerialize
|
||||
*/
|
||||
ResponseEntity<Boolean> fakeOuterBooleanSerialize(Boolean body);
|
||||
default ResponseEntity<Boolean> fakeOuterBooleanSerialize(Boolean body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/outer/composite
|
||||
@@ -53,7 +67,19 @@ public interface FakeApiDelegate {
|
||||
* @return Output composite (status code 200)
|
||||
* @see FakeApi#fakeOuterCompositeSerialize
|
||||
*/
|
||||
ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(OuterComposite body);
|
||||
default ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(OuterComposite body) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) {
|
||||
String exampleString = "{ \"my_string\" : \"my_string\", \"my_number\" : 0.8008281904610115, \"my_boolean\" : true }";
|
||||
ApiUtil.setExampleResponse(request, "*/*", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/outer/number
|
||||
@@ -63,7 +89,10 @@ public interface FakeApiDelegate {
|
||||
* @return Output number (status code 200)
|
||||
* @see FakeApi#fakeOuterNumberSerialize
|
||||
*/
|
||||
ResponseEntity<BigDecimal> fakeOuterNumberSerialize(BigDecimal body);
|
||||
default ResponseEntity<BigDecimal> fakeOuterNumberSerialize(BigDecimal body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/outer/string
|
||||
@@ -73,7 +102,10 @@ public interface FakeApiDelegate {
|
||||
* @return Output string (status code 200)
|
||||
* @see FakeApi#fakeOuterStringSerialize
|
||||
*/
|
||||
ResponseEntity<String> fakeOuterStringSerialize(String body);
|
||||
default ResponseEntity<String> fakeOuterStringSerialize(String body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /fake/body-with-file-schema
|
||||
@@ -83,7 +115,10 @@ public interface FakeApiDelegate {
|
||||
* @return Success (status code 200)
|
||||
* @see FakeApi#testBodyWithFileSchema
|
||||
*/
|
||||
ResponseEntity<Void> testBodyWithFileSchema(FileSchemaTestClass body);
|
||||
default ResponseEntity<Void> testBodyWithFileSchema(FileSchemaTestClass body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /fake/body-with-query-params
|
||||
@@ -93,8 +128,11 @@ public interface FakeApiDelegate {
|
||||
* @return Success (status code 200)
|
||||
* @see FakeApi#testBodyWithQueryParams
|
||||
*/
|
||||
ResponseEntity<Void> testBodyWithQueryParams(String query,
|
||||
User body);
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(String query,
|
||||
User body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH /fake : To test \"client\" model
|
||||
@@ -104,7 +142,19 @@ public interface FakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#testClientModel
|
||||
*/
|
||||
ResponseEntity<Client> testClientModel(Client body);
|
||||
default ResponseEntity<Client> testClientModel(Client body) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"client\" : \"client\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake : Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@@ -128,7 +178,7 @@ public interface FakeApiDelegate {
|
||||
* or User not found (status code 404)
|
||||
* @see FakeApi#testEndpointParameters
|
||||
*/
|
||||
ResponseEntity<Void> testEndpointParameters(BigDecimal number,
|
||||
default ResponseEntity<Void> testEndpointParameters(BigDecimal number,
|
||||
Double _double,
|
||||
String patternWithoutDelimiter,
|
||||
byte[] _byte,
|
||||
@@ -141,7 +191,10 @@ public interface FakeApiDelegate {
|
||||
LocalDate date,
|
||||
OffsetDateTime dateTime,
|
||||
String password,
|
||||
String paramCallback);
|
||||
String paramCallback) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /fake : To test enum parameters
|
||||
@@ -159,14 +212,17 @@ public interface FakeApiDelegate {
|
||||
* or Not found (status code 404)
|
||||
* @see FakeApi#testEnumParameters
|
||||
*/
|
||||
ResponseEntity<Void> testEnumParameters(List<String> enumHeaderStringArray,
|
||||
default ResponseEntity<Void> testEnumParameters(List<String> enumHeaderStringArray,
|
||||
String enumHeaderString,
|
||||
List<String> enumQueryStringArray,
|
||||
String enumQueryString,
|
||||
Integer enumQueryInteger,
|
||||
Double enumQueryDouble,
|
||||
List<String> enumFormStringArray,
|
||||
String enumFormString);
|
||||
String enumFormString) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /fake : Fake endpoint to test group parameters (optional)
|
||||
@@ -181,12 +237,15 @@ public interface FakeApiDelegate {
|
||||
* @return Someting wrong (status code 400)
|
||||
* @see FakeApi#testGroupParameters
|
||||
*/
|
||||
ResponseEntity<Void> testGroupParameters(Integer requiredStringGroup,
|
||||
default ResponseEntity<Void> testGroupParameters(Integer requiredStringGroup,
|
||||
Boolean requiredBooleanGroup,
|
||||
Long requiredInt64Group,
|
||||
Integer stringGroup,
|
||||
Boolean booleanGroup,
|
||||
Long int64Group);
|
||||
Long int64Group) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/inline-additionalProperties : test inline additionalProperties
|
||||
@@ -195,7 +254,10 @@ public interface FakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#testInlineAdditionalProperties
|
||||
*/
|
||||
ResponseEntity<Void> testInlineAdditionalProperties(Map<String, String> param);
|
||||
default ResponseEntity<Void> testInlineAdditionalProperties(Map<String, String> param) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /fake/jsonFormData : test json serialization of form data
|
||||
@@ -205,8 +267,11 @@ public interface FakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#testJsonFormData
|
||||
*/
|
||||
ResponseEntity<Void> testJsonFormData(String param,
|
||||
String param2);
|
||||
default ResponseEntity<Void> testJsonFormData(String param,
|
||||
String param2) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /fake/test-query-parameters
|
||||
@@ -220,11 +285,14 @@ public interface FakeApiDelegate {
|
||||
* @return Success (status code 200)
|
||||
* @see FakeApi#testQueryParameterCollectionFormat
|
||||
*/
|
||||
ResponseEntity<Void> testQueryParameterCollectionFormat(List<String> pipe,
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(List<String> pipe,
|
||||
List<String> ioutil,
|
||||
List<String> http,
|
||||
List<String> url,
|
||||
List<String> context);
|
||||
List<String> context) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
|
||||
@@ -235,8 +303,20 @@ public interface FakeApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#uploadFileWithRequiredFile
|
||||
*/
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(Long petId,
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(Long petId,
|
||||
MultipartFile requiredFile,
|
||||
String additionalMetadata);
|
||||
String additionalMetadata) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "fake_classname_test", description = "the fake_classname_test API")
|
||||
public interface FakeClassnameTestApi {
|
||||
|
||||
default FakeClassnameTestApiDelegate getDelegate() {
|
||||
return new FakeClassnameTestApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH /fake_classname_test : To test class name in snake case
|
||||
* To test class name in snake case
|
||||
@@ -49,8 +53,10 @@ public interface FakeClassnameTestApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> testClassname(
|
||||
default ResponseEntity<Client> testClassname(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
) {
|
||||
return getDelegate().testClassname(body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -12,13 +16,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -29,7 +34,12 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi {
|
||||
private final FakeClassnameTestApiDelegate delegate;
|
||||
|
||||
public FakeClassnameTestApiController(@Autowired(required = false) FakeClassnameTestApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new FakeClassnameTestApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public FakeClassnameTestApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package org.openapitools.api;
|
||||
|
||||
import org.openapitools.model.Client;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -15,6 +19,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface FakeClassnameTestApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* PATCH /fake_classname_test : To test class name in snake case
|
||||
* To test class name in snake case
|
||||
@@ -23,6 +31,18 @@ public interface FakeClassnameTestApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeClassnameTestApi#testClassname
|
||||
*/
|
||||
ResponseEntity<Client> testClassname(Client body);
|
||||
default ResponseEntity<Client> testClassname(Client body) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"client\" : \"client\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "pet", description = "the pet API")
|
||||
public interface PetApi {
|
||||
|
||||
default PetApiDelegate getDelegate() {
|
||||
return new PetApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /pet : Add a new pet to the store
|
||||
*
|
||||
@@ -54,9 +58,11 @@ public interface PetApi {
|
||||
value = "/pet",
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
ResponseEntity<Void> addPet(
|
||||
default ResponseEntity<Void> addPet(
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
);
|
||||
) {
|
||||
return getDelegate().addPet(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -87,10 +93,12 @@ public interface PetApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@ApiParam(value = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
|
||||
@ApiParam(value = "") @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
) {
|
||||
return getDelegate().deletePet(petId, apiKey);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -124,10 +132,12 @@ public interface PetApi {
|
||||
value = "/pet/findByStatus",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@NotNull @ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @Valid @RequestParam(value = "status", required = true) List<String> status,
|
||||
@ApiIgnore final Pageable pageable
|
||||
);
|
||||
) {
|
||||
return getDelegate().findPetsByStatus(status, pageable);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -162,10 +172,12 @@ public interface PetApi {
|
||||
value = "/pet/findByTags",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByTags(
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @ApiParam(value = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags,
|
||||
@ApiIgnore final Pageable pageable
|
||||
);
|
||||
) {
|
||||
return getDelegate().findPetsByTags(tags, pageable);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -197,9 +209,11 @@ public interface PetApi {
|
||||
value = "/pet/{petId}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@ApiParam(value = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
);
|
||||
) {
|
||||
return getDelegate().getPetById(petId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -234,9 +248,11 @@ public interface PetApi {
|
||||
value = "/pet",
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
ResponseEntity<Void> updatePet(
|
||||
default ResponseEntity<Void> updatePet(
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
);
|
||||
) {
|
||||
return getDelegate().updatePet(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -267,11 +283,13 @@ public interface PetApi {
|
||||
value = "/pet/{petId}",
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> updatePetWithForm(
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@ApiParam(value = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,
|
||||
@ApiParam(value = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status
|
||||
);
|
||||
) {
|
||||
return getDelegate().updatePetWithForm(petId, name, status);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -304,10 +322,12 @@ public interface PetApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@ApiParam(value = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@ApiParam(value = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
) {
|
||||
return getDelegate().uploadFile(petId, additionalMetadata, file);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,10 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.openapitools.model.Pet;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -15,13 +19,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -32,7 +37,12 @@ public class PetApiController implements PetApi {
|
||||
private final PetApiDelegate delegate;
|
||||
|
||||
public PetApiController(@Autowired(required = false) PetApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new PetApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public PetApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,11 +4,15 @@ import springfox.documentation.annotations.ApiIgnore;
|
||||
import org.openapitools.model.ModelApiResponse;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.openapitools.model.Pet;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -18,6 +22,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface PetApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /pet : Add a new pet to the store
|
||||
*
|
||||
@@ -26,7 +34,10 @@ public interface PetApiDelegate {
|
||||
* or Invalid input (status code 405)
|
||||
* @see PetApi#addPet
|
||||
*/
|
||||
ResponseEntity<Void> addPet(Pet body);
|
||||
default ResponseEntity<Void> addPet(Pet body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /pet/{petId} : Deletes a pet
|
||||
@@ -37,8 +48,11 @@ public interface PetApiDelegate {
|
||||
* or Invalid pet value (status code 400)
|
||||
* @see PetApi#deletePet
|
||||
*/
|
||||
ResponseEntity<Void> deletePet(Long petId,
|
||||
String apiKey);
|
||||
default ResponseEntity<Void> deletePet(Long petId,
|
||||
String apiKey) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /pet/findByStatus : Finds Pets by status
|
||||
@@ -49,7 +63,24 @@ public interface PetApiDelegate {
|
||||
* or Invalid status value (status code 400)
|
||||
* @see PetApi#findPetsByStatus
|
||||
*/
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(List<String> status, final Pageable pageable);
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(List<String> status, final Pageable pageable) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<Pet> <id>123456789</id> <name>doggie</name> <photoUrls> <photoUrls>aeiou</photoUrls> </photoUrls> <tags> </tags> <status>aeiou</status> </Pet>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /pet/findByTags : Finds Pets by tags
|
||||
@@ -61,7 +92,24 @@ public interface PetApiDelegate {
|
||||
* @deprecated
|
||||
* @see PetApi#findPetsByTags
|
||||
*/
|
||||
ResponseEntity<List<Pet>> findPetsByTags(List<String> tags, final Pageable pageable);
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(List<String> tags, final Pageable pageable) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<Pet> <id>123456789</id> <name>doggie</name> <photoUrls> <photoUrls>aeiou</photoUrls> </photoUrls> <tags> </tags> <status>aeiou</status> </Pet>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /pet/{petId} : Find pet by ID
|
||||
@@ -73,7 +121,24 @@ public interface PetApiDelegate {
|
||||
* or Pet not found (status code 404)
|
||||
* @see PetApi#getPetById
|
||||
*/
|
||||
ResponseEntity<Pet> getPetById(Long petId);
|
||||
default ResponseEntity<Pet> getPetById(Long petId) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"photoUrls\" : [ \"photoUrls\", \"photoUrls\" ], \"name\" : \"doggie\", \"id\" : 0, \"category\" : { \"name\" : \"default-name\", \"id\" : 6 }, \"tags\" : [ { \"name\" : \"name\", \"id\" : 1 }, { \"name\" : \"name\", \"id\" : 1 } ], \"status\" : \"available\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<Pet> <id>123456789</id> <name>doggie</name> <photoUrls> <photoUrls>aeiou</photoUrls> </photoUrls> <tags> </tags> <status>aeiou</status> </Pet>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /pet : Update an existing pet
|
||||
@@ -85,7 +150,10 @@ public interface PetApiDelegate {
|
||||
* or Validation exception (status code 405)
|
||||
* @see PetApi#updatePet
|
||||
*/
|
||||
ResponseEntity<Void> updatePet(Pet body);
|
||||
default ResponseEntity<Void> updatePet(Pet body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /pet/{petId} : Updates a pet in the store with form data
|
||||
@@ -96,9 +164,12 @@ public interface PetApiDelegate {
|
||||
* @return Invalid input (status code 405)
|
||||
* @see PetApi#updatePetWithForm
|
||||
*/
|
||||
ResponseEntity<Void> updatePetWithForm(Long petId,
|
||||
default ResponseEntity<Void> updatePetWithForm(Long petId,
|
||||
String name,
|
||||
String status);
|
||||
String status) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /pet/{petId}/uploadImage : uploads an image
|
||||
@@ -109,8 +180,20 @@ public interface PetApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see PetApi#uploadFile
|
||||
*/
|
||||
ResponseEntity<ModelApiResponse> uploadFile(Long petId,
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(Long petId,
|
||||
String additionalMetadata,
|
||||
MultipartFile file);
|
||||
MultipartFile file) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "store", description = "the store API")
|
||||
public interface StoreApi {
|
||||
|
||||
default StoreApiDelegate getDelegate() {
|
||||
return new StoreApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /store/order/{order_id} : Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@@ -46,9 +50,11 @@ public interface StoreApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@ApiParam(value = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
);
|
||||
) {
|
||||
return getDelegate().deleteOrder(orderId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -76,9 +82,11 @@ public interface StoreApi {
|
||||
value = "/store/inventory",
|
||||
produces = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Map<String, Integer>> getInventory(
|
||||
default ResponseEntity<Map<String, Integer>> getInventory(
|
||||
|
||||
);
|
||||
) {
|
||||
return getDelegate().getInventory();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -107,9 +115,11 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @ApiParam(value = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
);
|
||||
) {
|
||||
return getDelegate().getOrderById(orderId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -135,8 +145,10 @@ public interface StoreApi {
|
||||
value = "/store/order",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Order> placeOrder(
|
||||
default ResponseEntity<Order> placeOrder(
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body
|
||||
);
|
||||
) {
|
||||
return getDelegate().placeOrder(body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@ package org.openapitools.api;
|
||||
|
||||
import java.util.Map;
|
||||
import org.openapitools.model.Order;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -13,13 +17,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -30,7 +35,12 @@ public class StoreApiController implements StoreApi {
|
||||
private final StoreApiDelegate delegate;
|
||||
|
||||
public StoreApiController(@Autowired(required = false) StoreApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new StoreApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public StoreApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,11 +2,15 @@ package org.openapitools.api;
|
||||
|
||||
import java.util.Map;
|
||||
import org.openapitools.model.Order;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -16,6 +20,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface StoreApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /store/order/{order_id} : Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@@ -25,7 +33,10 @@ public interface StoreApiDelegate {
|
||||
* or Order not found (status code 404)
|
||||
* @see StoreApi#deleteOrder
|
||||
*/
|
||||
ResponseEntity<Void> deleteOrder(String orderId);
|
||||
default ResponseEntity<Void> deleteOrder(String orderId) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /store/inventory : Returns pet inventories by status
|
||||
@@ -34,7 +45,10 @@ public interface StoreApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see StoreApi#getInventory
|
||||
*/
|
||||
ResponseEntity<Map<String, Integer>> getInventory();
|
||||
default ResponseEntity<Map<String, Integer>> getInventory() {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /store/order/{order_id} : Find purchase order by ID
|
||||
@@ -46,7 +60,24 @@ public interface StoreApiDelegate {
|
||||
* or Order not found (status code 404)
|
||||
* @see StoreApi#getOrderById
|
||||
*/
|
||||
ResponseEntity<Order> getOrderById(Long orderId);
|
||||
default ResponseEntity<Order> getOrderById(Long orderId) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<Order> <id>123456789</id> <petId>123456789</petId> <quantity>123</quantity> <shipDate>2000-01-23T04:56:07.000Z</shipDate> <status>aeiou</status> <complete>true</complete> </Order>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /store/order : Place an order for a pet
|
||||
@@ -56,6 +87,23 @@ public interface StoreApiDelegate {
|
||||
* or Invalid Order (status code 400)
|
||||
* @see StoreApi#placeOrder
|
||||
*/
|
||||
ResponseEntity<Order> placeOrder(Order body);
|
||||
default ResponseEntity<Order> placeOrder(Order body) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"petId\" : 6, \"quantity\" : 1, \"id\" : 0, \"shipDate\" : \"2000-01-23T04:56:07.000+00:00\", \"complete\" : false, \"status\" : \"placed\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<Order> <id>123456789</id> <petId>123456789</petId> <quantity>123</quantity> <shipDate>2000-01-23T04:56:07.000Z</shipDate> <status>aeiou</status> <complete>true</complete> </Order>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,10 @@ import javax.annotation.Generated;
|
||||
@Api(value = "user", description = "the user API")
|
||||
public interface UserApi {
|
||||
|
||||
default UserApiDelegate getDelegate() {
|
||||
return new UserApiDelegate() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user : Create user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -45,9 +49,11 @@ public interface UserApi {
|
||||
method = RequestMethod.POST,
|
||||
value = "/user"
|
||||
)
|
||||
ResponseEntity<Void> createUser(
|
||||
default ResponseEntity<Void> createUser(
|
||||
@ApiParam(value = "Created user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
) {
|
||||
return getDelegate().createUser(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -69,9 +75,11 @@ public interface UserApi {
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithArray"
|
||||
)
|
||||
ResponseEntity<Void> createUsersWithArrayInput(
|
||||
default ResponseEntity<Void> createUsersWithArrayInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
);
|
||||
) {
|
||||
return getDelegate().createUsersWithArrayInput(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -93,9 +101,11 @@ public interface UserApi {
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithList"
|
||||
)
|
||||
ResponseEntity<Void> createUsersWithListInput(
|
||||
default ResponseEntity<Void> createUsersWithListInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
);
|
||||
) {
|
||||
return getDelegate().createUsersWithListInput(body);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -120,9 +130,11 @@ public interface UserApi {
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@ApiParam(value = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
);
|
||||
) {
|
||||
return getDelegate().deleteUser(username);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -150,9 +162,11 @@ public interface UserApi {
|
||||
value = "/user/{username}",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@ApiParam(value = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
);
|
||||
) {
|
||||
return getDelegate().getUserByName(username);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -179,10 +193,12 @@ public interface UserApi {
|
||||
value = "/user/login",
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
default ResponseEntity<String> loginUser(
|
||||
@NotNull @ApiParam(value = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @ApiParam(value = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
) {
|
||||
return getDelegate().loginUser(username, password);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -203,9 +219,11 @@ public interface UserApi {
|
||||
method = RequestMethod.GET,
|
||||
value = "/user/logout"
|
||||
)
|
||||
ResponseEntity<Void> logoutUser(
|
||||
default ResponseEntity<Void> logoutUser(
|
||||
|
||||
);
|
||||
) {
|
||||
return getDelegate().logoutUser();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -231,9 +249,11 @@ public interface UserApi {
|
||||
method = RequestMethod.PUT,
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@ApiParam(value = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
) {
|
||||
return getDelegate().updateUser(username, body);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,10 @@ package org.openapitools.api;
|
||||
import java.util.List;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.model.User;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -14,13 +18,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.CookieValue;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
@@ -31,7 +36,12 @@ public class UserApiController implements UserApi {
|
||||
private final UserApiDelegate delegate;
|
||||
|
||||
public UserApiController(@Autowired(required = false) UserApiDelegate delegate) {
|
||||
this.delegate = delegate;
|
||||
this.delegate = Optional.ofNullable(delegate).orElse(new UserApiDelegate() {});
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserApiDelegate getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,11 +3,15 @@ package org.openapitools.api;
|
||||
import java.util.List;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.model.User;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.context.request.NativeWebRequest;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
@@ -17,6 +21,10 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public interface UserApiDelegate {
|
||||
|
||||
default Optional<NativeWebRequest> getRequest() {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user : Create user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -25,7 +33,10 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUser
|
||||
*/
|
||||
ResponseEntity<Void> createUser(User body);
|
||||
default ResponseEntity<Void> createUser(User body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user/createWithArray : Creates list of users with given input array
|
||||
@@ -34,7 +45,10 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithArrayInput
|
||||
*/
|
||||
ResponseEntity<Void> createUsersWithArrayInput(List<User> body);
|
||||
default ResponseEntity<Void> createUsersWithArrayInput(List<User> body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user/createWithList : Creates list of users with given input array
|
||||
@@ -43,7 +57,10 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithListInput
|
||||
*/
|
||||
ResponseEntity<Void> createUsersWithListInput(List<User> body);
|
||||
default ResponseEntity<Void> createUsersWithListInput(List<User> body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /user/{username} : Delete user
|
||||
@@ -54,7 +71,10 @@ public interface UserApiDelegate {
|
||||
* or User not found (status code 404)
|
||||
* @see UserApi#deleteUser
|
||||
*/
|
||||
ResponseEntity<Void> deleteUser(String username);
|
||||
default ResponseEntity<Void> deleteUser(String username) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /user/{username} : Get user by user name
|
||||
@@ -65,7 +85,24 @@ public interface UserApiDelegate {
|
||||
* or User not found (status code 404)
|
||||
* @see UserApi#getUserByName
|
||||
*/
|
||||
ResponseEntity<User> getUserByName(String username);
|
||||
default ResponseEntity<User> getUserByName(String username) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"firstName\" : \"firstName\", \"lastName\" : \"lastName\", \"password\" : \"password\", \"userStatus\" : 6, \"phone\" : \"phone\", \"id\" : 0, \"email\" : \"email\", \"username\" : \"username\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/xml"))) {
|
||||
String exampleString = "<User> <id>123456789</id> <username>aeiou</username> <firstName>aeiou</firstName> <lastName>aeiou</lastName> <email>aeiou</email> <password>aeiou</password> <phone>aeiou</phone> <userStatus>123</userStatus> </User>";
|
||||
ApiUtil.setExampleResponse(request, "application/xml", exampleString);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /user/login : Logs user into the system
|
||||
@@ -76,8 +113,11 @@ public interface UserApiDelegate {
|
||||
* or Invalid username/password supplied (status code 400)
|
||||
* @see UserApi#loginUser
|
||||
*/
|
||||
ResponseEntity<String> loginUser(String username,
|
||||
String password);
|
||||
default ResponseEntity<String> loginUser(String username,
|
||||
String password) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /user/logout : Logs out current logged in user session
|
||||
@@ -85,7 +125,10 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#logoutUser
|
||||
*/
|
||||
ResponseEntity<Void> logoutUser();
|
||||
default ResponseEntity<Void> logoutUser() {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /user/{username} : Updated user
|
||||
@@ -97,7 +140,10 @@ public interface UserApiDelegate {
|
||||
* or User not found (status code 404)
|
||||
* @see UserApi#updateUser
|
||||
*/
|
||||
ResponseEntity<Void> updateUser(String username,
|
||||
User body);
|
||||
default ResponseEntity<Void> updateUser(String username,
|
||||
User body) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.model.ReadOnlyFirst;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.openapitools.model.CatAllOf;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.openapitools.model.DogAllOf;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.model.OuterEnum;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.UUID;
|
||||
import org.openapitools.model.Animal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import java.util.List;
|
||||
import org.openapitools.model.Category;
|
||||
import org.openapitools.model.Tag;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user