mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-09 17:10:56 +00:00
[Java][jersey2] Add nullable body support (#6784)
* add nullable body support * update serializeToString with nullable body * add nullable support to body parameter * minor code format change * Revert "minor code format change" This reverts commit 3af1838a9bf421e633165dbd8e62bb7740b539ef. * code format fix
This commit is contained in:
parent
d949c8181d
commit
e3cdb4c328
@ -2,6 +2,7 @@ generatorName: java
|
||||
outputDir: samples/openapi3/client/petstore/java/jersey2-java8
|
||||
library: jersey2
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-openapi3-jersey2-java8
|
||||
hideGenerationTimestamp: true
|
||||
|
@ -1486,20 +1486,20 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
|
||||
// option to change how we process + set the data in the 'additionalProperties' keyword.
|
||||
CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean(
|
||||
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
|
||||
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
|
||||
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
|
||||
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
|
||||
Map<String, String> disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
|
||||
disallowAdditionalPropertiesIfNotPresentOpts.put("false",
|
||||
"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
|
||||
"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
|
||||
disallowAdditionalPropertiesIfNotPresentOpts.put("true",
|
||||
"when the 'additionalProperties' keyword is not present in a schema, " +
|
||||
"the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " +
|
||||
"Note: this mode is not compliant with the JSON schema specification. " +
|
||||
"This is the original openapi-generator behavior.");
|
||||
"when the 'additionalProperties' keyword is not present in a schema, " +
|
||||
"the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. " +
|
||||
"Note: this mode is not compliant with the JSON schema specification. " +
|
||||
"This is the original openapi-generator behavior.");
|
||||
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
|
||||
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
|
||||
this.setDisallowAdditionalPropertiesIfNotPresent(true);
|
||||
|
||||
|
||||
// initialize special character mapping
|
||||
initalizeSpecialCharacterMapping();
|
||||
|
||||
@ -2640,7 +2640,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
Integer hasDiscriminatorCnt = 0;
|
||||
Integer hasNullTypeCnt = 0;
|
||||
Set<String> discriminatorsPropNames = new HashSet<>();
|
||||
for (Schema oneOf: composedSchema.getOneOf()) {
|
||||
for (Schema oneOf : composedSchema.getOneOf()) {
|
||||
if (ModelUtils.isNullType(oneOf)) {
|
||||
// The null type does not have a discriminator. Skip.
|
||||
hasNullTypeCnt++;
|
||||
@ -2654,7 +2654,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
if (discriminatorsPropNames.size() > 1) {
|
||||
throw new RuntimeException("The oneOf schemas have conflicting discriminator property names. " +
|
||||
"oneOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
||||
"oneOf schemas must have the same property name, but found " + String.join(", ", discriminatorsPropNames));
|
||||
}
|
||||
if ((hasDiscriminatorCnt + hasNullTypeCnt) == composedSchema.getOneOf().size() && discriminatorsPropNames.size() == 1) {
|
||||
disc.setPropertyName(foundDisc.getPropertyName());
|
||||
@ -2669,7 +2669,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
Integer hasDiscriminatorCnt = 0;
|
||||
Integer hasNullTypeCnt = 0;
|
||||
Set<String> discriminatorsPropNames = new HashSet<>();
|
||||
for (Schema anyOf: composedSchema.getAnyOf()) {
|
||||
for (Schema anyOf : composedSchema.getAnyOf()) {
|
||||
if (ModelUtils.isNullType(anyOf)) {
|
||||
// The null type does not have a discriminator. Skip.
|
||||
hasNullTypeCnt++;
|
||||
@ -2720,7 +2720,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
if (schemaList == null) {
|
||||
continue;
|
||||
}
|
||||
for (Schema sc: schemaList) {
|
||||
for (Schema sc : schemaList) {
|
||||
if (ModelUtils.isNullType(sc)) {
|
||||
continue;
|
||||
}
|
||||
@ -2875,7 +2875,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
* Handle the model for the 'additionalProperties' keyword in the OAS schema.
|
||||
*
|
||||
* @param codegenModel The codegen representation of the schema.
|
||||
* @param schema the input OAS schema.
|
||||
* @param schema The input OAS schema.
|
||||
*/
|
||||
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
|
||||
addParentContainer(codegenModel, codegenModel.name, schema);
|
||||
@ -3503,7 +3503,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
op.returnType = cm.dataType;
|
||||
op.returnFormat = cm.dataFormat;
|
||||
op.hasReference = schemas != null && schemas.containsKey(op.returnBaseType);
|
||||
|
||||
|
||||
// lookup discriminator
|
||||
Schema schema = schemas.get(op.returnBaseType);
|
||||
if (schema != null) {
|
||||
@ -3965,8 +3965,8 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
r.containerType = cp.containerType;
|
||||
r.isMapContainer = "map".equals(cp.containerType);
|
||||
r.isListContainer = "list".equalsIgnoreCase(cp.containerType) ||
|
||||
"array".equalsIgnoreCase(cp.containerType) ||
|
||||
"set".equalsIgnoreCase(cp.containerType);
|
||||
"array".equalsIgnoreCase(cp.containerType) ||
|
||||
"set".equalsIgnoreCase(cp.containerType);
|
||||
} else {
|
||||
r.simpleType = true;
|
||||
}
|
||||
@ -4317,7 +4317,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO revise below as it should be replaced by ModelUtils.isFileSchema(parameterSchema)
|
||||
public boolean isDataTypeFile(String dataType) {
|
||||
if (dataType != null) {
|
||||
@ -5795,6 +5795,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.baseType = codegenModel.classname;
|
||||
codegenParameter.dataType = getTypeDeclaration(codegenModel.classname);
|
||||
codegenParameter.description = codegenModel.description;
|
||||
codegenParameter.isNullable = codegenModel.isNullable;
|
||||
imports.add(codegenParameter.baseType);
|
||||
} else {
|
||||
CodegenProperty codegenProperty = fromProperty("property", schema);
|
||||
@ -5808,6 +5809,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.baseType = codegenParameter.baseName;
|
||||
codegenParameter.dataType = getTypeDeclaration(codegenModelName);
|
||||
codegenParameter.description = codegenProperty.getDescription();
|
||||
codegenParameter.isNullable = codegenProperty.isNullable;
|
||||
} else {
|
||||
if (ModelUtils.isMapSchema(schema)) {// http body is map
|
||||
LOGGER.error("Map should be supported. Please report to openapi-generator github repo about the issue.");
|
||||
@ -5916,6 +5918,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.baseType = getSchemaType(inner);
|
||||
codegenParameter.isContainer = Boolean.TRUE;
|
||||
codegenParameter.isMapContainer = Boolean.TRUE;
|
||||
codegenParameter.isNullable = codegenProperty.isNullable;
|
||||
|
||||
setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty);
|
||||
|
||||
@ -5958,6 +5961,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.baseType = getSchemaType(inner);
|
||||
codegenParameter.isContainer = Boolean.TRUE;
|
||||
codegenParameter.isListContainer = Boolean.TRUE;
|
||||
codegenParameter.isNullable = codegenProperty.isNullable;
|
||||
|
||||
setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty);
|
||||
// set nullable
|
||||
@ -5981,6 +5985,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.baseType = codegenProperty.baseType;
|
||||
codegenParameter.dataType = codegenProperty.dataType;
|
||||
codegenParameter.description = codegenProperty.description;
|
||||
codegenParameter.isNullable = codegenProperty.isNullable;
|
||||
codegenParameter.paramName = toParamName(codegenParameter.baseName);
|
||||
}
|
||||
setParameterBooleanFlagWithCodegenProperty(codegenParameter, codegenProperty);
|
||||
@ -6010,6 +6015,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
codegenParameter.minLength = codegenProperty.minLength;
|
||||
codegenParameter.maxLength = codegenProperty.maxLength;
|
||||
codegenParameter.pattern = codegenProperty.pattern;
|
||||
codegenParameter.isNullable = codegenProperty.isNullable;
|
||||
|
||||
if (codegenProperty.complexType != null) {
|
||||
imports.add(codegenProperty.complexType);
|
||||
|
@ -839,7 +839,7 @@ public class ApiClient {
|
||||
* @return Entity
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
Entity<?> entity;
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
MultiPart multiPart = new MultiPart();
|
||||
@ -863,7 +863,11 @@ public class ApiClient {
|
||||
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
|
||||
} else {
|
||||
// We let jersey handle the serialization
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
if (isBodyNullable) { // payload is nullable
|
||||
entity = Entity.entity(obj == null ? Entity.text("null") : obj, contentType);
|
||||
} else {
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@ -874,10 +878,11 @@ public class ApiClient {
|
||||
* @param obj Object
|
||||
* @param formParams Form parameters
|
||||
* @param contentType Context type
|
||||
* @param isBodyNulalble True if the body is nullable
|
||||
* @return String
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
try {
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
|
||||
@ -893,7 +898,11 @@ public class ApiClient {
|
||||
return formString.substring(0, formString.length() - 1);
|
||||
}
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
if (isBodyNullable) {
|
||||
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
|
||||
@ -1007,6 +1016,7 @@ public class ApiClient {
|
||||
* @param contentType The request's Content-Type header
|
||||
* @param authNames The authentications to apply
|
||||
* @param returnType The return type into which to deserialize the response
|
||||
* @param isBodyNullable True if the body is nullable
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@ -1022,7 +1032,8 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType)
|
||||
GenericType<T> returnType,
|
||||
boolean isBodyNullable)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@ -1069,7 +1080,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
Entity<?> entity = serialize(body, formParams, contentType);
|
||||
Entity<?> entity = serialize(body, formParams, contentType, isBodyNullable);
|
||||
|
||||
// put all headers in one place
|
||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||
@ -1081,7 +1092,7 @@ public class ApiClient {
|
||||
queryParams,
|
||||
allHeaderParams,
|
||||
cookieParams,
|
||||
serializeToString(body, formParams, contentType),
|
||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||
method,
|
||||
target.getUri());
|
||||
|
||||
@ -1170,8 +1181,8 @@ public class ApiClient {
|
||||
* @deprecated Add qualified name of the operation as a first parameter.
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -167,7 +167,7 @@ public class {{classname}} {
|
||||
{{/returnType}}
|
||||
return apiClient.invokeAPI("{{classname}}.{{operationId}}", localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}});
|
||||
localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}});
|
||||
}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
|
||||
|
@ -756,7 +756,7 @@ public class ApiClient {
|
||||
* @return Entity
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
Entity<?> entity;
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
MultiPart multiPart = new MultiPart();
|
||||
@ -780,7 +780,11 @@ public class ApiClient {
|
||||
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
|
||||
} else {
|
||||
// We let jersey handle the serialization
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
if (isBodyNullable) { // payload is nullable
|
||||
entity = Entity.entity(obj == null ? Entity.text("null") : obj, contentType);
|
||||
} else {
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@ -791,10 +795,11 @@ public class ApiClient {
|
||||
* @param obj Object
|
||||
* @param formParams Form parameters
|
||||
* @param contentType Context type
|
||||
* @param isBodyNulalble True if the body is nullable
|
||||
* @return String
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
try {
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
|
||||
@ -810,7 +815,11 @@ public class ApiClient {
|
||||
return formString.substring(0, formString.length() - 1);
|
||||
}
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
if (isBodyNullable) {
|
||||
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
|
||||
@ -918,6 +927,7 @@ public class ApiClient {
|
||||
* @param contentType The request's Content-Type header
|
||||
* @param authNames The authentications to apply
|
||||
* @param returnType The return type into which to deserialize the response
|
||||
* @param isBodyNullable True if the body is nullable
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@ -933,7 +943,8 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType)
|
||||
GenericType<T> returnType,
|
||||
boolean isBodyNullable)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@ -980,7 +991,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
Entity<?> entity = serialize(body, formParams, contentType);
|
||||
Entity<?> entity = serialize(body, formParams, contentType, isBodyNullable);
|
||||
|
||||
// put all headers in one place
|
||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||
@ -992,7 +1003,7 @@ public class ApiClient {
|
||||
queryParams,
|
||||
allHeaderParams,
|
||||
cookieParams,
|
||||
serializeToString(body, formParams, contentType),
|
||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||
method,
|
||||
target.getUri());
|
||||
|
||||
@ -1079,8 +1090,8 @@ public class ApiClient {
|
||||
* @deprecated Add qualified name of the operation as a first parameter.
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,6 +110,6 @@ public class AnotherFakeApi {
|
||||
|
||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.createXmlItem", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -177,7 +177,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -239,7 +239,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -301,7 +301,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -363,7 +363,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -427,7 +427,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -499,7 +499,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* To test \"client\" model
|
||||
@ -566,7 +566,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -701,7 +701,7 @@ if (paramCallback != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
@ -788,7 +788,7 @@ if (enumFormString != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
|
||||
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||
@ -844,7 +844,7 @@ if (booleanGroup != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
|
||||
public class APItestGroupParametersRequest {
|
||||
@ -1023,7 +1023,7 @@ if (booleanGroup != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
@ -1098,7 +1098,7 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1195,6 +1195,6 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,6 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
@ -183,7 +183,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
@ -253,7 +253,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -327,7 +327,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
@ -399,7 +399,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Update an existing pet
|
||||
@ -469,7 +469,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
@ -542,7 +542,7 @@ if (status != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
@ -618,7 +618,7 @@ if (file != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* uploads an image (required)
|
||||
@ -699,6 +699,6 @@ if (requiredFile != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
@ -170,7 +170,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
@ -242,7 +242,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Place an order for a pet
|
||||
@ -311,6 +311,6 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -171,7 +171,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -235,7 +235,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
@ -302,7 +302,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
@ -374,7 +374,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Logs user into the system
|
||||
@ -452,7 +452,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
@ -509,7 +509,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
@ -583,6 +583,6 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
}
|
||||
|
@ -835,7 +835,7 @@ public class ApiClient {
|
||||
* @return Entity
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
Entity<?> entity;
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
MultiPart multiPart = new MultiPart();
|
||||
@ -859,7 +859,11 @@ public class ApiClient {
|
||||
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
|
||||
} else {
|
||||
// We let jersey handle the serialization
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
if (isBodyNullable) { // payload is nullable
|
||||
entity = Entity.entity(obj == null ? Entity.text("null") : obj, contentType);
|
||||
} else {
|
||||
entity = Entity.entity(obj == null ? Entity.text("") : obj, contentType);
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
@ -870,10 +874,11 @@ public class ApiClient {
|
||||
* @param obj Object
|
||||
* @param formParams Form parameters
|
||||
* @param contentType Context type
|
||||
* @param isBodyNulalble True if the body is nullable
|
||||
* @return String
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
|
||||
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
|
||||
try {
|
||||
if (contentType.startsWith("multipart/form-data")) {
|
||||
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
|
||||
@ -889,7 +894,11 @@ public class ApiClient {
|
||||
return formString.substring(0, formString.length() - 1);
|
||||
}
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
if (isBodyNullable) {
|
||||
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
|
||||
} else {
|
||||
return json.getMapper().writeValueAsString(obj);
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
|
||||
@ -997,6 +1006,7 @@ public class ApiClient {
|
||||
* @param contentType The request's Content-Type header
|
||||
* @param authNames The authentications to apply
|
||||
* @param returnType The return type into which to deserialize the response
|
||||
* @param isBodyNullable True if the body is nullable
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@ -1012,7 +1022,8 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType)
|
||||
GenericType<T> returnType,
|
||||
boolean isBodyNullable)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@ -1059,7 +1070,7 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
Entity<?> entity = serialize(body, formParams, contentType);
|
||||
Entity<?> entity = serialize(body, formParams, contentType, isBodyNullable);
|
||||
|
||||
// put all headers in one place
|
||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||
@ -1071,7 +1082,7 @@ public class ApiClient {
|
||||
queryParams,
|
||||
allHeaderParams,
|
||||
cookieParams,
|
||||
serializeToString(body, formParams, contentType),
|
||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||
method,
|
||||
target.getUri());
|
||||
|
||||
@ -1158,8 +1169,8 @@ public class ApiClient {
|
||||
* @deprecated Add qualified name of the operation as a first parameter.
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType);
|
||||
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,6 +110,6 @@ public class AnotherFakeApi {
|
||||
|
||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -103,6 +103,6 @@ public class DefaultApi {
|
||||
|
||||
return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeHealthGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -174,7 +174,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -236,7 +236,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -298,7 +298,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -360,7 +360,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Array of Enums
|
||||
@ -420,7 +420,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.getArrayOfEnums", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -484,7 +484,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -556,7 +556,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* To test \"client\" model
|
||||
@ -623,7 +623,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
@ -758,7 +758,7 @@ if (paramCallback != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* To test enum parameters
|
||||
@ -845,7 +845,7 @@ if (enumFormString != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
|
||||
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||
@ -901,7 +901,7 @@ if (booleanGroup != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
|
||||
public class APItestGroupParametersRequest {
|
||||
@ -1080,7 +1080,7 @@ if (booleanGroup != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
@ -1155,7 +1155,7 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1252,6 +1252,6 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,6 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Deletes a pet
|
||||
@ -178,7 +178,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by status
|
||||
@ -248,7 +248,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
@ -322,7 +322,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
@ -394,7 +394,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Update an existing pet
|
||||
@ -462,7 +462,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
@ -535,7 +535,7 @@ if (status != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* uploads an image
|
||||
@ -611,7 +611,7 @@ if (file != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* uploads an image (required)
|
||||
@ -692,6 +692,6 @@ if (requiredFile != null)
|
||||
|
||||
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
@ -170,7 +170,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
@ -242,7 +242,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Place an order for a pet
|
||||
@ -311,6 +311,6 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -171,7 +171,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
@ -235,7 +235,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Delete user
|
||||
@ -302,7 +302,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Get user by user name
|
||||
@ -374,7 +374,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Logs user into the system
|
||||
@ -452,7 +452,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType);
|
||||
localVarAuthNames, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
@ -509,7 +509,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
/**
|
||||
* Updated user
|
||||
@ -583,6 +583,6 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null);
|
||||
localVarAuthNames, null, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user