forked from loafle/openapi-generator-original
various improvements to java okhttp-gson client (#13794)
This commit is contained in:
@@ -101,7 +101,8 @@ public class PetApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -109,7 +110,8 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "application/xml"
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -122,15 +124,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call addPetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet == null) {
|
||||
throw new ApiException("Missing the required parameter 'pet' when calling addPet(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = addPetCall(pet, _callback);
|
||||
return localVarCall;
|
||||
return addPetCall(pet, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -266,7 +265,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -274,7 +272,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -287,15 +284,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback);
|
||||
return localVarCall;
|
||||
return deletePetCall(petId, apiKey, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -432,7 +426,8 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -440,7 +435,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -453,15 +447,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback);
|
||||
return localVarCall;
|
||||
return findPetsByStatusCall(status, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -596,7 +587,8 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -604,7 +596,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -618,15 +609,12 @@ public class PetApi {
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback);
|
||||
return localVarCall;
|
||||
return findPetsByTagsCall(tags, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -768,7 +756,8 @@ public class PetApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -776,7 +765,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -789,15 +777,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getPetByIdCall(petId, _callback);
|
||||
return localVarCall;
|
||||
return getPetByIdCall(petId, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -933,7 +918,8 @@ public class PetApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
"application/xml",
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -941,7 +927,8 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json", "application/xml"
|
||||
"application/json",
|
||||
"application/xml"
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
@@ -954,15 +941,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetValidateBeforeCall(Pet pet, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet == null) {
|
||||
throw new ApiException("Missing the required parameter 'pet' when calling updatePet(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetCall(pet, _callback);
|
||||
return localVarCall;
|
||||
return updatePetCall(pet, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -1126,7 +1110,6 @@ public class PetApi {
|
||||
}
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
@@ -1147,15 +1130,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback);
|
||||
return localVarCall;
|
||||
return updatePetWithFormCall(petId, name, status, _callback);
|
||||
|
||||
}
|
||||
|
||||
@@ -1272,15 +1252,12 @@ public class PetApi {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)");
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, _file, _callback);
|
||||
return localVarCall;
|
||||
return uploadFileCall(petId, additionalMetadata, _file, _callback);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,10 @@ public class Category {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the Category instance itself
|
||||
*/
|
||||
public Category putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -128,6 +132,8 @@ public class Category {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -135,6 +141,9 @@ public class Category {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
@@ -144,6 +144,10 @@ public class ModelApiResponse {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the ModelApiResponse instance itself
|
||||
*/
|
||||
public ModelApiResponse putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -155,6 +159,8 @@ public class ModelApiResponse {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -162,6 +168,9 @@ public class ModelApiResponse {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
@@ -275,6 +275,10 @@ public class Order {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the Order instance itself
|
||||
*/
|
||||
public Order putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -286,6 +290,8 @@ public class Order {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -293,6 +299,9 @@ public class Order {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
@@ -293,6 +293,10 @@ public class Pet {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the Pet instance itself
|
||||
*/
|
||||
public Pet putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -304,6 +308,8 @@ public class Pet {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -311,6 +317,9 @@ public class Pet {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
@@ -117,6 +117,10 @@ public class Tag {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the Tag instance itself
|
||||
*/
|
||||
public Tag putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -128,6 +132,8 @@ public class Tag {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -135,6 +141,9 @@ public class Tag {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
@@ -279,6 +279,10 @@ public class User {
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @param value value of the property
|
||||
* @return the User instance itself
|
||||
*/
|
||||
public User putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
@@ -290,6 +294,8 @@ public class User {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*
|
||||
* @return a map of objects
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
@@ -297,6 +303,9 @@ public class User {
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*
|
||||
* @param key name of the property
|
||||
* @return an object
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
|
||||
Reference in New Issue
Block a user