[JAVA][Client] New object instead of null for empty POST request (#98)

new Object() for empty request body
This commit is contained in:
Ben Mordue
2018-06-07 05:37:37 +01:00
committed by Jérémie Bresson
parent 69a3852ef7
commit 0fb1ffa88b
36 changed files with 132 additions and 132 deletions

View File

@@ -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<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> 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) {

View File

@@ -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<Pet> findPetsByStatus(List<String> 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<Pet> findPetsByTags(List<String> 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) {

View File

@@ -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<String, Integer> 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) {

View File

@@ -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");