diff --git a/modules/swagger-codegen/src/main/resources/Java/api.mustache b/modules/swagger-codegen/src/main/resources/Java/api.mustache index 542ccbba287..383c310e579 100644 --- a/modules/swagger-codegen/src/main/resources/Java/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/api.mustache @@ -64,7 +64,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/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache index fed034609c8..17f27e94a3d 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/jersey2/api.mustache +++ b/modules/swagger-codegen/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/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache index ffc68bc7b5a..f6ab4d05e45 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/swagger-codegen/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/swagger-codegen/src/main/resources/Java/libraries/resteasy/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/resteasy/api.mustache index f3fd01ed61b..bd70d88a2dd 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/resteasy/api.mustache +++ b/modules/swagger-codegen/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/swagger-codegen/src/main/resources/Java/libraries/resttemplate/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/resttemplate/api.mustache index f48180f4381..a906a80e7a8 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/resttemplate/api.mustache +++ b/modules/swagger-codegen/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/jersey1/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java index 2e6a3b08728..27fd92085f2 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/FakeApi.java @@ -311,7 +311,7 @@ public Client testClientModel(Client body) throws ApiException { * @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, byte[] 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) { @@ -402,7 +402,7 @@ public void testEndpointParameters(BigDecimal number, Double _double, String pat * @throws ApiException if fails to make API call */ public void testEnumParameters(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble) throws ApiException { - Object localVarPostBody = null; + Object localVarPostBody = new Object(); // create path and map variables String localVarPath = "/fake"; @@ -493,7 +493,7 @@ public void testInlineAdditionalProperties(Object param) throws ApiException { * @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/jersey1/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java index edd3fb24885..3184b3dace8 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/PetApi.java @@ -99,7 +99,7 @@ public void addPet(Pet body) throws ApiException { * @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) { @@ -144,7 +144,7 @@ public void deletePet(Long petId, String apiKey) throws ApiException { * @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) { @@ -189,7 +189,7 @@ public List findPetsByStatus(List status) throws ApiException { */ @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) { @@ -232,7 +232,7 @@ public List findPetsByTags(List tags) throws ApiException { * @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) { @@ -317,7 +317,7 @@ public void updatePet(Pet body) throws ApiException { * @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) { @@ -366,7 +366,7 @@ public void updatePetWithForm(Long petId, String name, String status) throws Api * @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/jersey1/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java index 0c8a68f5d21..d316c9dc498 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/StoreApi.java @@ -55,7 +55,7 @@ public void setApiClient(ApiClient apiClient) { * @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) { @@ -97,7 +97,7 @@ public void deleteOrder(String orderId) throws ApiException { * @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"; @@ -134,7 +134,7 @@ public Map getInventory() throws ApiException { * @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/jersey1/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java index 5d44eb9cd82..2298fad6255 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/io/swagger/client/api/UserApi.java @@ -178,7 +178,7 @@ public void createUsersWithListInput(List body) throws ApiException { * @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) { @@ -221,7 +221,7 @@ public void deleteUser(String username) throws ApiException { * @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) { @@ -265,7 +265,7 @@ public User getUserByName(String username) throws ApiException { * @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) { @@ -312,7 +312,7 @@ public String loginUser(String username, String password) throws ApiException { * @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"; diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java index a442b24bd53..2876f4ea0ad 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/FakeApi.java @@ -800,7 +800,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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, byte[] 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"; @@ -1007,7 +1007,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEnumParametersCall(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, 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"; @@ -1276,7 +1276,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java index 23b9049e61b..163c787d854 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/PetApi.java @@ -184,7 +184,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don */ @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java index a517a459d79..0bd2e2c1c62 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/StoreApi.java @@ -63,7 +63,7 @@ public void setApiClient(ApiClient apiClient) { * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java index 518d851e31a..99532edeec8 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/io/swagger/client/api/UserApi.java @@ -417,7 +417,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java index a442b24bd53..2876f4ea0ad 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java @@ -800,7 +800,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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, byte[] 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"; @@ -1007,7 +1007,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @throws ApiException If fail to serialize the request body object */ public com.squareup.okhttp.Call testEnumParametersCall(List enumFormStringArray, String enumFormString, List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, 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"; @@ -1276,7 +1276,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java index 23b9049e61b..163c787d854 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java @@ -184,7 +184,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don */ @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java index a517a459d79..0bd2e2c1c62 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java @@ -63,7 +63,7 @@ public void setApiClient(ApiClient apiClient) { * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java index 518d851e31a..99532edeec8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java @@ -417,7 +417,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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 void onRequestProgress(long bytesWritten, long contentLength, boolean don * @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";