forked from loafle/openapi-generator-original
[spring] fix default value for nullable containers (#14959)
* fix default value, update spec to 3.0 * add tests for container default value * update java camel samples * remove samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable * remove ./bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml * remove samples/openapi3/server/petstore/springboot-useoptional * remove samples/openapi3/server/petstore/springboot-reactive * update github workflow * fix default in add, put operation
This commit is contained in:
@@ -36,7 +36,7 @@ public interface AnotherFakeApi {
|
||||
* PATCH /another-fake/dummy : To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -56,10 +56,10 @@ public interface AnotherFakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Client>> call123testSpecialTags(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> body,
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> client,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().call123testSpecialTags(body, exchange);
|
||||
return getDelegate().call123testSpecialTags(client, exchange);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ public interface AnotherFakeApiDelegate {
|
||||
* PATCH /another-fake/dummy : To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see AnotherFakeApi#call123testSpecialTags
|
||||
*/
|
||||
default Mono<ResponseEntity<Client>> call123testSpecialTags(Mono<Client> body,
|
||||
default Mono<ResponseEntity<Client>> call123testSpecialTags(Mono<Client> client,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -47,7 +47,7 @@ public interface AnotherFakeApiDelegate {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(client).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ public interface FakeApi {
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/boolean",
|
||||
produces = { "*/*" }
|
||||
produces = { "*/*" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Boolean>> fakeOuterBooleanSerialize(
|
||||
@ApiParam(value = "Input boolean as post body") @Valid @RequestBody(required = false) Mono<Boolean> body,
|
||||
@@ -105,7 +106,7 @@ public interface FakeApi {
|
||||
* POST /fake/outer/composite
|
||||
* Test serialization of object with outer number type
|
||||
*
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param outerComposite Input composite as post body (optional)
|
||||
* @return Output composite (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -121,13 +122,14 @@ public interface FakeApi {
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/composite",
|
||||
produces = { "*/*" }
|
||||
produces = { "*/*" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<OuterComposite>> fakeOuterCompositeSerialize(
|
||||
@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono<OuterComposite> body,
|
||||
@ApiParam(value = "Input composite as post body") @Valid @RequestBody(required = false) Mono<OuterComposite> outerComposite,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().fakeOuterCompositeSerialize(body, exchange);
|
||||
return getDelegate().fakeOuterCompositeSerialize(outerComposite, exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +153,8 @@ public interface FakeApi {
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/number",
|
||||
produces = { "*/*" }
|
||||
produces = { "*/*" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<BigDecimal>> fakeOuterNumberSerialize(
|
||||
@ApiParam(value = "Input number as post body") @Valid @RequestBody(required = false) Mono<BigDecimal> body,
|
||||
@@ -181,7 +184,8 @@ public interface FakeApi {
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/fake/outer/string",
|
||||
produces = { "*/*" }
|
||||
produces = { "*/*" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<String>> fakeOuterStringSerialize(
|
||||
@ApiParam(value = "Input string as post body") @Valid @RequestBody(required = false) Mono<String> body,
|
||||
@@ -195,7 +199,7 @@ public interface FakeApi {
|
||||
* PUT /fake/body-with-file-schema
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
*
|
||||
* @param body (required)
|
||||
* @param fileSchemaTestClass (required)
|
||||
* @return Success (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -213,10 +217,10 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testBodyWithFileSchema(
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody Mono<FileSchemaTestClass> body,
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody Mono<FileSchemaTestClass> fileSchemaTestClass,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testBodyWithFileSchema(body, exchange);
|
||||
return getDelegate().testBodyWithFileSchema(fileSchemaTestClass, exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +228,7 @@ public interface FakeApi {
|
||||
* PUT /fake/body-with-query-params
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param user (required)
|
||||
* @return Success (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -243,10 +247,10 @@ public interface FakeApi {
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testBodyWithQueryParams(
|
||||
@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody Mono<User> body,
|
||||
@ApiParam(value = "", required = true) @Valid @RequestBody Mono<User> user,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testBodyWithQueryParams(query, body, exchange);
|
||||
return getDelegate().testBodyWithQueryParams(query, user, exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +258,7 @@ public interface FakeApi {
|
||||
* PATCH /fake : To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -274,10 +278,10 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Client>> testClientModel(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> body,
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> client,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testClientModel(body, exchange);
|
||||
return getDelegate().testClientModel(client, exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -426,8 +430,9 @@ public interface FakeApi {
|
||||
|
||||
/**
|
||||
* POST /fake/inline-additionalProperties : test inline additionalProperties
|
||||
*
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param requestBody request body (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -445,15 +450,16 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testInlineAdditionalProperties(
|
||||
@ApiParam(value = "request body", required = true) @Valid @RequestBody Mono<Map<String, String>> param,
|
||||
@ApiParam(value = "request body", required = true) @Valid @RequestBody Mono<Map<String, String>> requestBody,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testInlineAdditionalProperties(param, exchange);
|
||||
return getDelegate().testInlineAdditionalProperties(requestBody, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GET /fake/jsonFormData : test json serialization of form data
|
||||
*
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
@@ -487,7 +493,6 @@ public interface FakeApi {
|
||||
* To test the collection format in query parameters
|
||||
*
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
@@ -508,18 +513,18 @@ public interface FakeApi {
|
||||
)
|
||||
default Mono<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,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange);
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, http, url, context, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
|
||||
@@ -74,11 +74,11 @@ public interface FakeApiDelegate {
|
||||
* POST /fake/outer/composite
|
||||
* Test serialization of object with outer number type
|
||||
*
|
||||
* @param body Input composite as post body (optional)
|
||||
* @param outerComposite Input composite as post body (optional)
|
||||
* @return Output composite (status code 200)
|
||||
* @see FakeApi#fakeOuterCompositeSerialize
|
||||
*/
|
||||
default Mono<ResponseEntity<OuterComposite>> fakeOuterCompositeSerialize(Mono<OuterComposite> body,
|
||||
default Mono<ResponseEntity<OuterComposite>> fakeOuterCompositeSerialize(Mono<OuterComposite> outerComposite,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -89,7 +89,7 @@ public interface FakeApiDelegate {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(outerComposite).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
@@ -129,15 +129,15 @@ public interface FakeApiDelegate {
|
||||
* PUT /fake/body-with-file-schema
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
*
|
||||
* @param body (required)
|
||||
* @param fileSchemaTestClass (required)
|
||||
* @return Success (status code 200)
|
||||
* @see FakeApi#testBodyWithFileSchema
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> testBodyWithFileSchema(Mono<FileSchemaTestClass> body,
|
||||
default Mono<ResponseEntity<Void>> testBodyWithFileSchema(Mono<FileSchemaTestClass> fileSchemaTestClass,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(fileSchemaTestClass).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
@@ -145,16 +145,16 @@ public interface FakeApiDelegate {
|
||||
* PUT /fake/body-with-query-params
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @param user (required)
|
||||
* @return Success (status code 200)
|
||||
* @see FakeApi#testBodyWithQueryParams
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> testBodyWithQueryParams(String query,
|
||||
Mono<User> body,
|
||||
Mono<User> user,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(user).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
@@ -162,11 +162,11 @@ public interface FakeApiDelegate {
|
||||
* PATCH /fake : To test \"client\" model
|
||||
* To test \"client\" model
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#testClientModel
|
||||
*/
|
||||
default Mono<ResponseEntity<Client>> testClientModel(Mono<Client> body,
|
||||
default Mono<ResponseEntity<Client>> testClientModel(Mono<Client> client,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -177,7 +177,7 @@ public interface FakeApiDelegate {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(client).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
@@ -283,21 +283,23 @@ public interface FakeApiDelegate {
|
||||
|
||||
/**
|
||||
* POST /fake/inline-additionalProperties : test inline additionalProperties
|
||||
*
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @param requestBody request body (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeApi#testInlineAdditionalProperties
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> testInlineAdditionalProperties(Mono<Map<String, String>> param,
|
||||
default Mono<ResponseEntity<Void>> testInlineAdditionalProperties(Mono<Map<String, String>> requestBody,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(param).then(Mono.empty());
|
||||
return result.then(requestBody).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* GET /fake/jsonFormData : test json serialization of form data
|
||||
*
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
@@ -318,7 +320,6 @@ public interface FakeApiDelegate {
|
||||
* To test the collection format in query parameters
|
||||
*
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
@@ -326,7 +327,6 @@ public interface FakeApiDelegate {
|
||||
* @see FakeApi#testQueryParameterCollectionFormat
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> testQueryParameterCollectionFormat(List<String> pipe,
|
||||
List<String> ioutil,
|
||||
List<String> http,
|
||||
List<String> url,
|
||||
List<String> context,
|
||||
@@ -339,6 +339,7 @@ public interface FakeApiDelegate {
|
||||
|
||||
/**
|
||||
* POST /fake/{petId}/uploadImageWithRequiredFile : uploads an image (required)
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface FakeClassnameTestApi {
|
||||
* PATCH /fake_classname_test : To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -59,10 +59,10 @@ public interface FakeClassnameTestApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Client>> testClassname(
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> body,
|
||||
@ApiParam(value = "client model", required = true) @Valid @RequestBody Mono<Client> client,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testClassname(body, exchange);
|
||||
return getDelegate().testClassname(client, exchange);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ public interface FakeClassnameTestApiDelegate {
|
||||
* PATCH /fake_classname_test : To test class name in snake case
|
||||
* To test class name in snake case
|
||||
*
|
||||
* @param body client model (required)
|
||||
* @param client client model (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see FakeClassnameTestApi#testClassname
|
||||
*/
|
||||
default Mono<ResponseEntity<Client>> testClassname(Mono<Client> body,
|
||||
default Mono<ResponseEntity<Client>> testClassname(Mono<Client> client,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -47,7 +47,7 @@ public interface FakeClassnameTestApiDelegate {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(client).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,9 @@ public interface PetApi {
|
||||
|
||||
/**
|
||||
* POST /pet : Add a new pet to the store
|
||||
*
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param pet Pet object that needs to be added to the store (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid input (status code 405)
|
||||
*/
|
||||
@@ -63,15 +64,16 @@ public interface PetApi {
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> addPet(
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono<Pet> body,
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono<Pet> pet,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().addPet(body, exchange);
|
||||
return getDelegate().addPet(pet, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DELETE /pet/{petId} : Deletes a pet
|
||||
*
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
@@ -226,8 +228,9 @@ public interface PetApi {
|
||||
|
||||
/**
|
||||
* PUT /pet : Update an existing pet
|
||||
*
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param pet Pet object that needs to be added to the store (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid ID supplied (status code 400)
|
||||
* or Pet not found (status code 404)
|
||||
@@ -257,15 +260,16 @@ public interface PetApi {
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> updatePet(
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono<Pet> body,
|
||||
@ApiParam(value = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Mono<Pet> pet,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().updatePet(body, exchange);
|
||||
return getDelegate().updatePet(pet, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* POST /pet/{petId} : Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
@@ -304,6 +308,7 @@ public interface PetApi {
|
||||
|
||||
/**
|
||||
* POST /pet/{petId}/uploadImage : uploads an image
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
|
||||
@@ -32,22 +32,24 @@ public interface PetApiDelegate {
|
||||
|
||||
/**
|
||||
* POST /pet : Add a new pet to the store
|
||||
*
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param pet Pet object that needs to be added to the store (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid input (status code 405)
|
||||
* @see PetApi#addPet
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> addPet(Mono<Pet> body,
|
||||
default Mono<ResponseEntity<Void>> addPet(Mono<Pet> pet,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(pet).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* DELETE /pet/{petId} : Deletes a pet
|
||||
*
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
@@ -156,24 +158,26 @@ public interface PetApiDelegate {
|
||||
|
||||
/**
|
||||
* PUT /pet : Update an existing pet
|
||||
*
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param pet Pet object that needs to be added to the store (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid ID supplied (status code 400)
|
||||
* or Pet not found (status code 404)
|
||||
* or Validation exception (status code 405)
|
||||
* @see PetApi#updatePet
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> updatePet(Mono<Pet> body,
|
||||
default Mono<ResponseEntity<Void>> updatePet(Mono<Pet> pet,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(pet).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /pet/{petId} : Updates a pet in the store with form data
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
@@ -193,6 +197,7 @@ public interface PetApiDelegate {
|
||||
|
||||
/**
|
||||
* POST /pet/{petId}/uploadImage : uploads an image
|
||||
*
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
|
||||
@@ -131,8 +131,9 @@ public interface StoreApi {
|
||||
|
||||
/**
|
||||
* POST /store/order : Place an order for a pet
|
||||
*
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid Order (status code 400)
|
||||
*/
|
||||
@@ -150,13 +151,14 @@ public interface StoreApi {
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/store/order",
|
||||
produces = { "application/xml", "application/json" }
|
||||
produces = { "application/xml", "application/json" },
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Order>> placeOrder(
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono<Order> body,
|
||||
@ApiParam(value = "order placed for purchasing the pet", required = true) @Valid @RequestBody Mono<Order> order,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().placeOrder(body, exchange);
|
||||
return getDelegate().placeOrder(order, exchange);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,13 +92,14 @@ public interface StoreApiDelegate {
|
||||
|
||||
/**
|
||||
* POST /store/order : Place an order for a pet
|
||||
*
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param order order placed for purchasing the pet (required)
|
||||
* @return successful operation (status code 200)
|
||||
* or Invalid Order (status code 400)
|
||||
* @see StoreApi#placeOrder
|
||||
*/
|
||||
default Mono<ResponseEntity<Order>> placeOrder(Mono<Order> body,
|
||||
default Mono<ResponseEntity<Order>> placeOrder(Mono<Order> order,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -114,7 +115,7 @@ public interface StoreApiDelegate {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(order).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface UserApi {
|
||||
* POST /user : Create user
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param body Created user object (required)
|
||||
* @param user Created user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -52,20 +52,22 @@ public interface UserApi {
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user"
|
||||
value = "/user",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> createUser(
|
||||
@ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono<User> body,
|
||||
@ApiParam(value = "Created user object", required = true) @Valid @RequestBody Mono<User> user,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().createUser(body, exchange);
|
||||
return getDelegate().createUser(user, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* POST /user/createWithArray : Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param user List of user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -79,20 +81,22 @@ public interface UserApi {
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithArray"
|
||||
value = "/user/createWithArray",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> createUsersWithArrayInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux<User> body,
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux<User> user,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().createUsersWithArrayInput(body, exchange);
|
||||
return getDelegate().createUsersWithArrayInput(user, exchange);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* POST /user/createWithList : Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param user List of user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@ApiOperation(
|
||||
@@ -106,13 +110,14 @@ public interface UserApi {
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.POST,
|
||||
value = "/user/createWithList"
|
||||
value = "/user/createWithList",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> createUsersWithListInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux<User> body,
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody Flux<User> user,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().createUsersWithListInput(body, exchange);
|
||||
return getDelegate().createUsersWithListInput(user, exchange);
|
||||
}
|
||||
|
||||
|
||||
@@ -148,6 +153,7 @@ public interface UserApi {
|
||||
|
||||
/**
|
||||
* GET /user/{username} : Get user by user name
|
||||
*
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return successful operation (status code 200)
|
||||
@@ -181,6 +187,7 @@ public interface UserApi {
|
||||
|
||||
/**
|
||||
* GET /user/login : Logs user into the system
|
||||
*
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
@@ -214,6 +221,7 @@ public interface UserApi {
|
||||
|
||||
/**
|
||||
* GET /user/logout : Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
* @return successful operation (status code 200)
|
||||
*/
|
||||
@@ -242,7 +250,7 @@ public interface UserApi {
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param user Updated user object (required)
|
||||
* @return Invalid user supplied (status code 400)
|
||||
* or User not found (status code 404)
|
||||
*/
|
||||
@@ -258,14 +266,15 @@ public interface UserApi {
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.PUT,
|
||||
value = "/user/{username}"
|
||||
value = "/user/{username}",
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<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 Mono<User> body,
|
||||
@ApiParam(value = "Updated user object", required = true) @Valid @RequestBody Mono<User> user,
|
||||
@ApiIgnore final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().updateUser(username, body, exchange);
|
||||
return getDelegate().updateUser(username, user, exchange);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,45 +34,47 @@ public interface UserApiDelegate {
|
||||
* POST /user : Create user
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param body Created user object (required)
|
||||
* @param user Created user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUser
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> createUser(Mono<User> body,
|
||||
default Mono<ResponseEntity<Void>> createUser(Mono<User> user,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(user).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user/createWithArray : Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param user List of user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithArrayInput
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> createUsersWithArrayInput(Flux<User> body,
|
||||
default Mono<ResponseEntity<Void>> createUsersWithArrayInput(Flux<User> user,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.thenMany(body).then(Mono.empty());
|
||||
return result.thenMany(user).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /user/createWithList : Creates list of users with given input array
|
||||
*
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @param user List of user object (required)
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithListInput
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> createUsersWithListInput(Flux<User> body,
|
||||
default Mono<ResponseEntity<Void>> createUsersWithListInput(Flux<User> user,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.thenMany(body).then(Mono.empty());
|
||||
return result.thenMany(user).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
@@ -95,6 +97,7 @@ public interface UserApiDelegate {
|
||||
|
||||
/**
|
||||
* GET /user/{username} : Get user by user name
|
||||
*
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return successful operation (status code 200)
|
||||
@@ -124,6 +127,7 @@ public interface UserApiDelegate {
|
||||
|
||||
/**
|
||||
* GET /user/login : Logs user into the system
|
||||
*
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
@@ -142,6 +146,7 @@ public interface UserApiDelegate {
|
||||
|
||||
/**
|
||||
* GET /user/logout : Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#logoutUser
|
||||
@@ -158,17 +163,17 @@ public interface UserApiDelegate {
|
||||
* This can only be done by the logged in user.
|
||||
*
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param user Updated user object (required)
|
||||
* @return Invalid user supplied (status code 400)
|
||||
* or User not found (status code 404)
|
||||
* @see UserApi#updateUser
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> updateUser(String username,
|
||||
Mono<User> body,
|
||||
Mono<User> user,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(body).then(Mono.empty());
|
||||
return result.then(user).then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,13 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.util.NoSuchElementException;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
@@ -28,41 +31,41 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
@JsonProperty("map_string")
|
||||
@Valid
|
||||
private Map<String, String> mapString = null;
|
||||
private Map<String, String> mapString = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_number")
|
||||
@Valid
|
||||
private Map<String, BigDecimal> mapNumber = null;
|
||||
private Map<String, BigDecimal> mapNumber = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_integer")
|
||||
@Valid
|
||||
private Map<String, Integer> mapInteger = null;
|
||||
private Map<String, Integer> mapInteger = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_boolean")
|
||||
@Valid
|
||||
private Map<String, Boolean> mapBoolean = null;
|
||||
private Map<String, Boolean> mapBoolean = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_array_integer")
|
||||
@Valid
|
||||
private Map<String, List<Integer>> mapArrayInteger = null;
|
||||
private Map<String, List<Integer>> mapArrayInteger = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_array_anytype")
|
||||
@Valid
|
||||
private Map<String, List<Object>> mapArrayAnytype = null;
|
||||
private Map<String, List<Object>> mapArrayAnytype = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_map_string")
|
||||
@Valid
|
||||
private Map<String, Map<String, String>> mapMapString = null;
|
||||
private Map<String, Map<String, String>> mapMapString = new HashMap<>();
|
||||
|
||||
@JsonProperty("map_map_anytype")
|
||||
@Valid
|
||||
private Map<String, Map<String, Object>> mapMapAnytype = null;
|
||||
private Map<String, Map<String, Object>> mapMapAnytype = new HashMap<>();
|
||||
|
||||
@JsonProperty("anytype_1")
|
||||
private Object anytype1;
|
||||
|
||||
@JsonProperty("anytype_2")
|
||||
private Object anytype2;
|
||||
private JsonNullable<Object> anytype2 = JsonNullable.undefined();
|
||||
|
||||
@JsonProperty("anytype_3")
|
||||
private Object anytype3;
|
||||
@@ -303,7 +306,7 @@ public class AdditionalPropertiesClass {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass anytype2(Object anytype2) {
|
||||
this.anytype2 = anytype2;
|
||||
this.anytype2 = JsonNullable.of(anytype2);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -313,11 +316,11 @@ public class AdditionalPropertiesClass {
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
public Object getAnytype2() {
|
||||
public JsonNullable<Object> getAnytype2() {
|
||||
return anytype2;
|
||||
}
|
||||
|
||||
public void setAnytype2(Object anytype2) {
|
||||
public void setAnytype2(JsonNullable<Object> anytype2) {
|
||||
this.anytype2 = anytype2;
|
||||
}
|
||||
|
||||
@@ -358,13 +361,24 @@ public class AdditionalPropertiesClass {
|
||||
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
|
||||
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
|
||||
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
|
||||
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
|
||||
equalsNullable(this.anytype2, additionalPropertiesClass.anytype2) &&
|
||||
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
|
||||
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, hashCodeNullable(anytype2), anytype3);
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
@JsonProperty("ArrayArrayNumber")
|
||||
@Valid
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
@JsonProperty("ArrayNumber")
|
||||
@Valid
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
private List<BigDecimal> arrayNumber = new ArrayList<>();
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
this.arrayNumber = arrayNumber;
|
||||
|
||||
@@ -27,15 +27,15 @@ public class ArrayTest {
|
||||
|
||||
@JsonProperty("array_of_string")
|
||||
@Valid
|
||||
private List<String> arrayOfString = null;
|
||||
private List<String> arrayOfString = new ArrayList<>();
|
||||
|
||||
@JsonProperty("array_array_of_integer")
|
||||
@Valid
|
||||
private List<List<Long>> arrayArrayOfInteger = null;
|
||||
private List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
|
||||
|
||||
@JsonProperty("array_array_of_model")
|
||||
@Valid
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
this.arrayOfString = arrayOfString;
|
||||
|
||||
@@ -0,0 +1,225 @@
|
||||
package org.openapitools.model;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.util.NoSuchElementException;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.time.OffsetDateTime;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
* ContainerDefaultValue
|
||||
*/
|
||||
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ContainerDefaultValue {
|
||||
|
||||
@JsonProperty("nullable_array")
|
||||
@Valid
|
||||
private JsonNullable<List<String>> nullableArray = JsonNullable.undefined();
|
||||
|
||||
@JsonProperty("nullable_required_array")
|
||||
@Valid
|
||||
private JsonNullable<List<String>> nullableRequiredArray = JsonNullable.undefined();
|
||||
|
||||
@JsonProperty("required_array")
|
||||
@Valid
|
||||
private List<String> requiredArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("nullable_array_with_default")
|
||||
@Valid
|
||||
private JsonNullable<List<String>> nullableArrayWithDefault = JsonNullable.undefined();
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
* @deprecated Use {@link ContainerDefaultValue#ContainerDefaultValue(List<String>, List<String>)}
|
||||
*/
|
||||
@Deprecated
|
||||
public ContainerDefaultValue() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor with only required parameters
|
||||
*/
|
||||
public ContainerDefaultValue(List<String> nullableRequiredArray, List<String> requiredArray) {
|
||||
this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray);
|
||||
this.requiredArray = requiredArray;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue nullableArray(List<String> nullableArray) {
|
||||
this.nullableArray = JsonNullable.of(nullableArray);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue addNullableArrayItem(String nullableArrayItem) {
|
||||
if (this.nullableArray == null || !this.nullableArray.isPresent()) {
|
||||
this.nullableArray = JsonNullable.of(new ArrayList<>());
|
||||
}
|
||||
this.nullableArray.get().add(nullableArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nullableArray
|
||||
* @return nullableArray
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
public JsonNullable<List<String>> getNullableArray() {
|
||||
return nullableArray;
|
||||
}
|
||||
|
||||
public void setNullableArray(JsonNullable<List<String>> nullableArray) {
|
||||
this.nullableArray = nullableArray;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue nullableRequiredArray(List<String> nullableRequiredArray) {
|
||||
this.nullableRequiredArray = JsonNullable.of(nullableRequiredArray);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue addNullableRequiredArrayItem(String nullableRequiredArrayItem) {
|
||||
if (this.nullableRequiredArray == null || !this.nullableRequiredArray.isPresent()) {
|
||||
this.nullableRequiredArray = JsonNullable.of(new ArrayList<>());
|
||||
}
|
||||
this.nullableRequiredArray.get().add(nullableRequiredArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nullableRequiredArray
|
||||
* @return nullableRequiredArray
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public JsonNullable<List<String>> getNullableRequiredArray() {
|
||||
return nullableRequiredArray;
|
||||
}
|
||||
|
||||
public void setNullableRequiredArray(JsonNullable<List<String>> nullableRequiredArray) {
|
||||
this.nullableRequiredArray = nullableRequiredArray;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue requiredArray(List<String> requiredArray) {
|
||||
this.requiredArray = requiredArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue addRequiredArrayItem(String requiredArrayItem) {
|
||||
if (this.requiredArray == null) {
|
||||
this.requiredArray = new ArrayList<>();
|
||||
}
|
||||
this.requiredArray.add(requiredArrayItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get requiredArray
|
||||
* @return requiredArray
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public List<String> getRequiredArray() {
|
||||
return requiredArray;
|
||||
}
|
||||
|
||||
public void setRequiredArray(List<String> requiredArray) {
|
||||
this.requiredArray = requiredArray;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue nullableArrayWithDefault(List<String> nullableArrayWithDefault) {
|
||||
this.nullableArrayWithDefault = JsonNullable.of(nullableArrayWithDefault);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ContainerDefaultValue addNullableArrayWithDefaultItem(String nullableArrayWithDefaultItem) {
|
||||
if (this.nullableArrayWithDefault == null || !this.nullableArrayWithDefault.isPresent()) {
|
||||
this.nullableArrayWithDefault = JsonNullable.of(new ArrayList<>(Arrays.asList("foo", "bar")));
|
||||
}
|
||||
this.nullableArrayWithDefault.get().add(nullableArrayWithDefaultItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get nullableArrayWithDefault
|
||||
* @return nullableArrayWithDefault
|
||||
*/
|
||||
|
||||
@ApiModelProperty(value = "")
|
||||
public JsonNullable<List<String>> getNullableArrayWithDefault() {
|
||||
return nullableArrayWithDefault;
|
||||
}
|
||||
|
||||
public void setNullableArrayWithDefault(JsonNullable<List<String>> nullableArrayWithDefault) {
|
||||
this.nullableArrayWithDefault = nullableArrayWithDefault;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ContainerDefaultValue containerDefaultValue = (ContainerDefaultValue) o;
|
||||
return equalsNullable(this.nullableArray, containerDefaultValue.nullableArray) &&
|
||||
Objects.equals(this.nullableRequiredArray, containerDefaultValue.nullableRequiredArray) &&
|
||||
Objects.equals(this.requiredArray, containerDefaultValue.requiredArray) &&
|
||||
equalsNullable(this.nullableArrayWithDefault, containerDefaultValue.nullableArrayWithDefault);
|
||||
}
|
||||
|
||||
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
|
||||
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(hashCodeNullable(nullableArray), nullableRequiredArray, requiredArray, hashCodeNullable(nullableArrayWithDefault));
|
||||
}
|
||||
|
||||
private static <T> int hashCodeNullable(JsonNullable<T> a) {
|
||||
if (a == null) {
|
||||
return 1;
|
||||
}
|
||||
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ContainerDefaultValue {\n");
|
||||
sb.append(" nullableArray: ").append(toIndentedString(nullableArray)).append("\n");
|
||||
sb.append(" nullableRequiredArray: ").append(toIndentedString(nullableRequiredArray)).append("\n");
|
||||
sb.append(" requiredArray: ").append(toIndentedString(requiredArray)).append("\n");
|
||||
sb.append(" nullableArrayWithDefault: ").append(toIndentedString(nullableArrayWithDefault)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ public class EnumArrays {
|
||||
|
||||
@JsonProperty("array_enum")
|
||||
@Valid
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
private List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
this.justSymbol = justSymbol;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class FileSchemaTestClass {
|
||||
|
||||
@JsonProperty("files")
|
||||
@Valid
|
||||
private List<@Valid File> files = null;
|
||||
private List<@Valid File> files = new ArrayList<>();
|
||||
|
||||
public FileSchemaTestClass file(File file) {
|
||||
this.file = file;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MapTest {
|
||||
|
||||
@JsonProperty("map_map_of_string")
|
||||
@Valid
|
||||
private Map<String, Map<String, String>> mapMapOfString = null;
|
||||
private Map<String, Map<String, String>> mapMapOfString = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Gets or Sets inner
|
||||
@@ -66,15 +66,15 @@ public class MapTest {
|
||||
|
||||
@JsonProperty("map_of_enum_string")
|
||||
@Valid
|
||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||
private Map<String, InnerEnum> mapOfEnumString = new HashMap<>();
|
||||
|
||||
@JsonProperty("direct_map")
|
||||
@Valid
|
||||
private Map<String, Boolean> directMap = null;
|
||||
private Map<String, Boolean> directMap = new HashMap<>();
|
||||
|
||||
@JsonProperty("indirect_map")
|
||||
@Valid
|
||||
private Map<String, Boolean> indirectMap = null;
|
||||
private Map<String, Boolean> indirectMap = new HashMap<>();
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
@JsonProperty("map")
|
||||
@Valid
|
||||
private Map<String, Animal> map = null;
|
||||
private Map<String, Animal> map = new HashMap<>();
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
this.uuid = uuid;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Pet {
|
||||
|
||||
@JsonProperty("tags")
|
||||
@Valid
|
||||
private List<@Valid Tag> tags = null;
|
||||
private List<@Valid Tag> tags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@@ -167,6 +167,9 @@ public class Pet {
|
||||
}
|
||||
|
||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||
if (this.photoUrls == null) {
|
||||
this.photoUrls = new LinkedHashSet<>();
|
||||
}
|
||||
this.photoUrls.add(photoUrlsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import javax.annotation.Generated;
|
||||
* SpecialModelName
|
||||
*/
|
||||
|
||||
@JsonTypeName("$special[model.name]")
|
||||
@JsonTypeName("_special_model.name_")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class SpecialModelName {
|
||||
|
||||
@@ -54,8 +54,8 @@ public class SpecialModelName {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SpecialModelName $specialModelName = (SpecialModelName) o;
|
||||
return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
|
||||
SpecialModelName specialModelName = (SpecialModelName) o;
|
||||
return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,17 +29,17 @@ public class TypeHolderDefault {
|
||||
private String stringItem = "what";
|
||||
|
||||
@JsonProperty("number_item")
|
||||
private BigDecimal numberItem;
|
||||
private BigDecimal numberItem = new BigDecimal("1.234");
|
||||
|
||||
@JsonProperty("integer_item")
|
||||
private Integer integerItem;
|
||||
private Integer integerItem = -2;
|
||||
|
||||
@JsonProperty("bool_item")
|
||||
private Boolean boolItem = true;
|
||||
|
||||
@JsonProperty("array_item")
|
||||
@Valid
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
private List<Integer> arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
@@ -143,6 +143,9 @@ public class TypeHolderDefault {
|
||||
}
|
||||
|
||||
public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
|
||||
if (this.arrayItem == null) {
|
||||
this.arrayItem = new ArrayList<>(Arrays.asList(0, 1, 2, 3));
|
||||
}
|
||||
this.arrayItem.add(arrayItemItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -166,6 +166,9 @@ public class TypeHolderExample {
|
||||
}
|
||||
|
||||
public TypeHolderExample addArrayItemItem(Integer arrayItemItem) {
|
||||
if (this.arrayItem == null) {
|
||||
this.arrayItem = new ArrayList<>();
|
||||
}
|
||||
this.arrayItem.add(arrayItemItem);
|
||||
return this;
|
||||
}
|
||||
@@ -175,7 +178,7 @@ public class TypeHolderExample {
|
||||
* @return arrayItem
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
|
||||
@ApiModelProperty(example = "[0,1,2,3]", required = true, value = "")
|
||||
public List<Integer> getArrayItem() {
|
||||
return arrayItem;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class XmlItem {
|
||||
|
||||
@JsonProperty("wrapped_array")
|
||||
@Valid
|
||||
private List<Integer> wrappedArray = null;
|
||||
private List<Integer> wrappedArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("name_string")
|
||||
private String nameString;
|
||||
@@ -55,11 +55,11 @@ public class XmlItem {
|
||||
|
||||
@JsonProperty("name_array")
|
||||
@Valid
|
||||
private List<Integer> nameArray = null;
|
||||
private List<Integer> nameArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("name_wrapped_array")
|
||||
@Valid
|
||||
private List<Integer> nameWrappedArray = null;
|
||||
private List<Integer> nameWrappedArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("prefix_string")
|
||||
private String prefixString;
|
||||
@@ -75,11 +75,11 @@ public class XmlItem {
|
||||
|
||||
@JsonProperty("prefix_array")
|
||||
@Valid
|
||||
private List<Integer> prefixArray = null;
|
||||
private List<Integer> prefixArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("prefix_wrapped_array")
|
||||
@Valid
|
||||
private List<Integer> prefixWrappedArray = null;
|
||||
private List<Integer> prefixWrappedArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("namespace_string")
|
||||
private String namespaceString;
|
||||
@@ -95,11 +95,11 @@ public class XmlItem {
|
||||
|
||||
@JsonProperty("namespace_array")
|
||||
@Valid
|
||||
private List<Integer> namespaceArray = null;
|
||||
private List<Integer> namespaceArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("namespace_wrapped_array")
|
||||
@Valid
|
||||
private List<Integer> namespaceWrappedArray = null;
|
||||
private List<Integer> namespaceWrappedArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("prefix_ns_string")
|
||||
private String prefixNsString;
|
||||
@@ -115,11 +115,11 @@ public class XmlItem {
|
||||
|
||||
@JsonProperty("prefix_ns_array")
|
||||
@Valid
|
||||
private List<Integer> prefixNsArray = null;
|
||||
private List<Integer> prefixNsArray = new ArrayList<>();
|
||||
|
||||
@JsonProperty("prefix_ns_wrapped_array")
|
||||
@Valid
|
||||
private List<Integer> prefixNsWrappedArray = null;
|
||||
private List<Integer> prefixNsWrappedArray = new ArrayList<>();
|
||||
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
this.attributeString = attributeString;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user