From 0fb1ffa88b1e6908577a18a0fce6f593f553b6cd Mon Sep 17 00:00:00 2001 From: Ben Mordue Date: Thu, 7 Jun 2018 05:37:37 +0100 Subject: [PATCH] [JAVA][Client] New object instead of null for empty POST request (#98) new Object() for empty request body --- .../resources/Java/libraries/jersey2/api.mustache | 2 +- .../Java/libraries/okhttp-gson/api.mustache | 2 +- .../resources/Java/libraries/resteasy/api.mustache | 2 +- .../Java/libraries/resttemplate/api.mustache | 2 +- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- .../java/org/openapitools/client/api/FakeApi.java | 6 +++--- .../java/org/openapitools/client/api/PetApi.java | 12 ++++++------ .../java/org/openapitools/client/api/StoreApi.java | 6 +++--- .../java/org/openapitools/client/api/UserApi.java | 8 ++++---- 36 files changed, 132 insertions(+), 132 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache index ad7d43d611..985834fe2c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/jersey2/api.mustache @@ -91,7 +91,7 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache index 0ef776280f..5f599b117d 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -82,7 +82,7 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public com.squareup.okhttp.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; // create path and map variables String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache index 5a80dcca14..a4d0f9f239 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resteasy/api.mustache @@ -57,7 +57,7 @@ public class {{classname}} { @Deprecated {{/isDeprecated}} public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache index f48180f438..a906a80e7a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache @@ -61,7 +61,7 @@ public class {{classname}} { {{/externalDocs}} */ public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws RestClientException { - Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; + Object {{localVariablePrefix}}postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set if ({{paramName}} == null) { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java index 0ee48c2207..b584b933a0 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/FakeApi.java @@ -384,7 +384,7 @@ public class FakeApi { * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -492,7 +492,7 @@ if (paramCallback != null) * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -603,7 +603,7 @@ if (enumFormString != null) * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java index a171d3b03c..fd98d4fe4b 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java @@ -108,7 +108,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -163,7 +163,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -220,7 +220,7 @@ public class PetApi { */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -273,7 +273,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -380,7 +380,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -441,7 +441,7 @@ if (status != null) * @throws ApiException if fails to make API call */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java index 73ab56d02e..591f53adad 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/StoreApi.java @@ -53,7 +53,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -104,7 +104,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory"; @@ -151,7 +151,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java index 034d92235b..5795c7e626 100644 --- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/UserApi.java @@ -206,7 +206,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -259,7 +259,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -314,7 +314,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -370,7 +370,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout"; diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index 42f2baafba..85d65da24a 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -384,7 +384,7 @@ public class FakeApi { * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -492,7 +492,7 @@ if (paramCallback != null) * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -603,7 +603,7 @@ if (enumFormString != null) * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java index a171d3b03c..fd98d4fe4b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java @@ -108,7 +108,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -163,7 +163,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -220,7 +220,7 @@ public class PetApi { */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -273,7 +273,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -380,7 +380,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -441,7 +441,7 @@ if (status != null) * @throws ApiException if fails to make API call */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 73ab56d02e..591f53adad 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -53,7 +53,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -104,7 +104,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory"; @@ -151,7 +151,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java index 034d92235b..5795c7e626 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/UserApi.java @@ -206,7 +206,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -259,7 +259,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -314,7 +314,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -370,7 +370,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout"; diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java index 0ee48c2207..b584b933a0 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -384,7 +384,7 @@ public class FakeApi { * @throws ApiException if fails to make API call */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -492,7 +492,7 @@ if (paramCallback != null) * @throws ApiException if fails to make API call */ public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -603,7 +603,7 @@ if (enumFormString != null) * @throws ApiException if fails to make API call */ public ApiResponse testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java index a171d3b03c..fd98d4fe4b 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java @@ -108,7 +108,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -163,7 +163,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -220,7 +220,7 @@ public class PetApi { */ @Deprecated public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -273,7 +273,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -380,7 +380,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -441,7 +441,7 @@ if (status != null) * @throws ApiException if fails to make API call */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java index 73ab56d02e..591f53adad 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -53,7 +53,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -104,7 +104,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory"; @@ -151,7 +151,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java index 034d92235b..5795c7e626 100644 --- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/UserApi.java @@ -206,7 +206,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -259,7 +259,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -314,7 +314,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -370,7 +370,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout"; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index 42069ca70b..95caada798 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -801,7 +801,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -1008,7 +1008,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -1277,7 +1277,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake/jsonFormData"; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java index 512dbd0c1f..67962e30e0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java @@ -184,7 +184,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -308,7 +308,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/findByStatus"; @@ -434,7 +434,7 @@ public class PetApi { */ @Deprecated public com.squareup.okhttp.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/findByTags"; @@ -565,7 +565,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -808,7 +808,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -939,7 +939,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}/uploadImage" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index ef2e8467c5..c4669755c1 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -63,7 +63,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" @@ -181,7 +181,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory"; @@ -295,7 +295,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java index c4d204bf96..bf4c1fb77a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/UserApi.java @@ -417,7 +417,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" @@ -536,7 +536,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" @@ -660,7 +660,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/login"; @@ -793,7 +793,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout"; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index 42069ca70b..95caada798 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -801,7 +801,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -1008,7 +1008,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEnumParametersCall(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -1277,7 +1277,7 @@ public class FakeApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testJsonFormDataCall(String param, String param2, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake/jsonFormData"; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java index 512dbd0c1f..67962e30e0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java @@ -184,7 +184,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -308,7 +308,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/findByStatus"; @@ -434,7 +434,7 @@ public class PetApi { */ @Deprecated public com.squareup.okhttp.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/findByTags"; @@ -565,7 +565,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -808,7 +808,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}" @@ -939,7 +939,7 @@ public class PetApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/pet/{petId}/uploadImage" diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index ef2e8467c5..c4669755c1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -63,7 +63,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" @@ -181,7 +181,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory"; @@ -295,7 +295,7 @@ public class StoreApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/order/{order_id}" diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java index c4d204bf96..bf4c1fb77a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/UserApi.java @@ -417,7 +417,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" @@ -536,7 +536,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/{username}" @@ -660,7 +660,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/login"; @@ -793,7 +793,7 @@ public class UserApi { * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout"; diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java index af859e620e..2d5093e66a 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/FakeApi.java @@ -292,7 +292,7 @@ public class FakeApi { * @throws ApiException if fails to make API call */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -382,7 +382,7 @@ if (paramCallback != null) * @throws ApiException if fails to make API call */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake".replaceAll("\\{format\\}","json"); @@ -470,7 +470,7 @@ if (enumFormString != null) * @throws ApiException if fails to make API call */ public void testJsonFormData(String param, String param2) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java index 9de79d2d82..ae62c12ede 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java @@ -84,7 +84,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public void deletePet(Long petId, String apiKey) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -128,7 +128,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public List findPetsByStatus(List status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -172,7 +172,7 @@ public class PetApi { */ @Deprecated public List findPetsByTags(List tags) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -214,7 +214,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public Pet getPetById(Long petId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -297,7 +297,7 @@ public class PetApi { * @throws ApiException if fails to make API call */ public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -345,7 +345,7 @@ if (status != null) * @throws ApiException if fails to make API call */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java index e0450968c2..1ecb74e597 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java @@ -41,7 +41,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public void deleteOrder(String orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -82,7 +82,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public Map getInventory() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); @@ -118,7 +118,7 @@ public class StoreApi { * @throws ApiException if fails to make API call */ public Order getOrderById(Long orderId) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java index d0f4dc9dda..9fc2750b64 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/UserApi.java @@ -161,7 +161,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public void deleteUser(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -203,7 +203,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public User getUserByName(String username) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -246,7 +246,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public String loginUser(String username, String password) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -292,7 +292,7 @@ public class UserApi { * @throws ApiException if fails to make API call */ public void logoutUser() throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 78ab547438..373ad07f49 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -266,7 +266,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -351,7 +351,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); @@ -428,7 +428,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testJsonFormData(String param, String param2) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java index 5d009f2675..c1d31488ce 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java @@ -89,7 +89,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deletePet(Long petId, String apiKey) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -128,7 +128,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByStatus(List status) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -165,7 +165,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByTags(List tags) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -203,7 +203,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Pet getPetById(Long petId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -276,7 +276,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -320,7 +320,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index e417838bba..2a5743dc74 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -54,7 +54,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteOrder(String orderId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -88,7 +88,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Map getInventory() throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/store/inventory").build().toUriString(); @@ -119,7 +119,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order getOrderById(Long orderId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java index 2949e2f57a..bd89c01b8a 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/UserApi.java @@ -147,7 +147,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteUser(String username) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -184,7 +184,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public User getUserByName(String username) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -223,7 +223,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public String loginUser(String username, String password) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -263,7 +263,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void logoutUser() throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/user/logout").build().toUriString(); diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 78ab547438..373ad07f49 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -266,7 +266,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'number' is set if (number == null) { @@ -351,7 +351,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/fake").build().toUriString(); @@ -428,7 +428,7 @@ public class FakeApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void testJsonFormData(String param, String param2) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'param' is set if (param == null) { diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java index 5d009f2675..c1d31488ce 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java @@ -89,7 +89,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deletePet(Long petId, String apiKey) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -128,7 +128,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByStatus(List status) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'status' is set if (status == null) { @@ -165,7 +165,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public List findPetsByTags(List tags) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'tags' is set if (tags == null) { @@ -203,7 +203,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Pet getPetById(Long petId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -276,7 +276,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void updatePetWithForm(Long petId, String name, String status) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { @@ -320,7 +320,7 @@ public class PetApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'petId' is set if (petId == null) { diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index e417838bba..2a5743dc74 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -54,7 +54,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteOrder(String orderId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { @@ -88,7 +88,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Map getInventory() throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/store/inventory").build().toUriString(); @@ -119,7 +119,7 @@ public class StoreApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public Order getOrderById(Long orderId) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'orderId' is set if (orderId == null) { diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java index 2949e2f57a..bd89c01b8a 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/UserApi.java @@ -147,7 +147,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void deleteUser(String username) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -184,7 +184,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public User getUserByName(String username) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -223,7 +223,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public String loginUser(String username, String password) throws RestClientException { - Object postBody = null; + Object postBody = new Object(); // verify the required parameter 'username' is set if (username == null) { @@ -263,7 +263,7 @@ public class UserApi { * @throws RestClientException if an error occurs while attempting to invoke the API */ public void logoutUser() throws RestClientException { - Object postBody = null; + Object postBody = new Object(); String path = UriComponentsBuilder.fromPath("/user/logout").build().toUriString();