mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 17:12:49 +00:00
[Java][Jersey2] various improvements (#6518)
* [java][jersey2] Add support for discriminator, fix nullable typo and nullable deserialization (#6495) * Mustache template should use invokerPackage tag to generate import * fix typo, fix script issue, add log statement for troubleshooting * Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme * Add sample for Java jersey2 and HTTP signature scheme * Add unit test for oneOf schema deserialization * Add unit test for oneOf schema deserialization * Add log statements * Add profile for jersey2 * Temporarily disable unit test * Temporarily disable unit test * support for discriminator in jersey2 * fix typo in pom.xml * disable unit test because jersey2 deserialization is broken * disable unit test because jersey2 deserialization is broken * fix duplicate jersey2 samples * fix duplicate jersey2 samples * Add code comments * fix duplicate artifact id * fix duplicate jersey2 samples * run samples scripts * resolve merge conflicts * Add unit tests * fix unit tests * continue implementation of discriminator lookup * throw deserialization exception when value is null and schema does not allow null value * continue implementation of compose schema * continue implementation of compose schema * continue implementation of compose schema * Add more unit tests * Add unit tests for anyOf * Add unit tests Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com> * update samples * add tests to oas3 java jersey2 petstore * comment out jersey2 ensure uptodate * Jersey2 supports additional properties with composed schema (#6523) * Mustache template should use invokerPackage tag to generate import * fix typo, fix script issue, add log statement for troubleshooting * Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme * Add sample for Java jersey2 and HTTP signature scheme * Add unit test for oneOf schema deserialization * Add unit test for oneOf schema deserialization * Add log statements * Add profile for jersey2 * Temporarily disable unit test * Temporarily disable unit test * support for discriminator in jersey2 * fix typo in pom.xml * disable unit test because jersey2 deserialization is broken * disable unit test because jersey2 deserialization is broken * fix duplicate jersey2 samples * fix duplicate jersey2 samples * Add code comments * fix duplicate artifact id * fix duplicate jersey2 samples * run samples scripts * resolve merge conflicts * Add unit tests * fix unit tests * continue implementation of discriminator lookup * throw deserialization exception when value is null and schema does not allow null value * continue implementation of compose schema * continue implementation of compose schema * continue implementation of compose schema * Add more unit tests * Add unit tests for anyOf * Add unit tests * Set supportsAdditionalPropertiesWithComposedSchema to true for Java jersey2 * Support additional properties as nested field * Support additional properties as nested field * add code comments * add customer deserializer * Fix 'method too big' error with generated code * resolve merge conflicts Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com> * [Jersey2] Fix code generation of 'registerDiscriminator' method for large models (#6535) * Mustache template should use invokerPackage tag to generate import * fix typo, fix script issue, add log statement for troubleshooting * Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme * Add sample for Java jersey2 and HTTP signature scheme * Add unit test for oneOf schema deserialization * Add unit test for oneOf schema deserialization * Add log statements * Add profile for jersey2 * Temporarily disable unit test * Temporarily disable unit test * support for discriminator in jersey2 * fix typo in pom.xml * disable unit test because jersey2 deserialization is broken * disable unit test because jersey2 deserialization is broken * fix duplicate jersey2 samples * fix duplicate jersey2 samples * Add code comments * fix duplicate artifact id * fix duplicate jersey2 samples * run samples scripts * resolve merge conflicts * Add unit tests * fix unit tests * continue implementation of discriminator lookup * throw deserialization exception when value is null and schema does not allow null value * continue implementation of compose schema * continue implementation of compose schema * continue implementation of compose schema * Add more unit tests * Add unit tests for anyOf * Add unit tests * Fix 'method too big' error with generated code * resolve merge conflicts Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com> * update samples * comment out tests * support additional properties in serialize and deserialize * add discriminator lookup * remove oneof/anyof logic in apilcient * add serializer to mammal.java * add serialize to oneOf model * add serializer to anyof model * comment out test cases that are subject to further discussion * add back files * update configs, samples Co-authored-by: Sebastien Rosset <serosset@cisco.com> Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
This commit is contained in:
@@ -4,6 +4,7 @@ library: jersey2
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
additionalProperties:
|
||||
artifactId: petstore-jersey2-java8
|
||||
hideGenerationTimestamp: "true"
|
||||
hideGenerationTimestamp: true
|
||||
serverPort: "8082"
|
||||
dateLibrary: java8
|
||||
useOneOfDiscriminatorLookup: true
|
||||
|
||||
@@ -4,6 +4,7 @@ library: jersey2
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
additionalProperties:
|
||||
artifactId: petstore-openapi3-jersey2-java8
|
||||
hideGenerationTimestamp: "true"
|
||||
hideGenerationTimestamp: true
|
||||
serverPort: "8082"
|
||||
dateLibrary: java8
|
||||
useOneOfDiscriminatorLookup: true
|
||||
|
||||
@@ -1649,10 +1649,24 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
@Override
|
||||
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
|
||||
super.addAdditionPropertiesToCodeGenModel(codegenModel, schema);
|
||||
if (!supportsAdditionalPropertiesWithComposedSchema) {
|
||||
// The additional (undeclared) propertiees are modeled in Java as a HashMap.
|
||||
//
|
||||
// 1. supportsAdditionalPropertiesWithComposedSchema is set to false:
|
||||
// The generated model class extends from the HashMap. That does not work
|
||||
// with composed schemas that also use a discriminator because the model class
|
||||
// is supposed to extend from the generated parent model class.
|
||||
// 2. supportsAdditionalPropertiesWithComposedSchema is set to true:
|
||||
// The HashMap is a field.
|
||||
super.addAdditionPropertiesToCodeGenModel(codegenModel, schema);
|
||||
}
|
||||
|
||||
// See https://github.com/OpenAPITools/openapi-generator/pull/1729#issuecomment-449937728
|
||||
codegenModel.additionalPropertiesType = getSchemaType(getAdditionalProperties(schema));
|
||||
addImport(codegenModel, codegenModel.additionalPropertiesType);
|
||||
Schema s = getAdditionalProperties(schema);
|
||||
// 's' may be null if 'additionalProperties: false' in the OpenAPI schema.
|
||||
if (s != null) {
|
||||
codegenModel.additionalPropertiesType = getSchemaType(s);
|
||||
addImport(codegenModel, codegenModel.additionalPropertiesType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,6 +176,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
// inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values,
|
||||
// and the discriminator mapping schemas in the OAS document.
|
||||
this.setLegacyDiscriminatorBehavior(false);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -371,6 +372,14 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
}
|
||||
supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java"));
|
||||
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
|
||||
|
||||
// Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema.
|
||||
// In principle, this should be enabled by default for all code generators. However due to limitations
|
||||
// in other code generators, support needs to be enabled on a case-by-case basis.
|
||||
// The flag below should be set for all Java libraries, but the templates need to be ported
|
||||
// one by one for each library.
|
||||
supportsAdditionalPropertiesWithComposedSchema = true;
|
||||
|
||||
} else if (NATIVE.equals(getLibrary())) {
|
||||
setJava8Mode(true);
|
||||
additionalProperties.put("java8", "true");
|
||||
@@ -587,38 +596,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
objs = AbstractJavaJAXRSServerCodegen.jaxrsPostProcessOperations(objs);
|
||||
}
|
||||
|
||||
if (JERSEY2.equals(getLibrary())) {
|
||||
// index the model
|
||||
HashMap<String, CodegenModel> modelMaps = new HashMap<String, CodegenModel>();
|
||||
for (Object o : allModels) {
|
||||
HashMap<String, Object> h = (HashMap<String, Object>) o;
|
||||
CodegenModel m = (CodegenModel) h.get("model");
|
||||
modelMaps.put(m.classname, m);
|
||||
}
|
||||
|
||||
// check if return type is oneOf/anyeOf model
|
||||
Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
|
||||
List<CodegenOperation> operationList = (List<CodegenOperation>) operations.get("operation");
|
||||
for (CodegenOperation op : operationList) {
|
||||
if (op.returnType != null) {
|
||||
// look up the model to see if it's anyOf/oneOf
|
||||
if (modelMaps.containsKey(op.returnType) && modelMaps.get(op.returnType) != null) {
|
||||
CodegenModel cm = modelMaps.get(op.returnType);
|
||||
|
||||
if (cm.oneOf != null && !cm.oneOf.isEmpty()) {
|
||||
op.vendorExtensions.put("x-java-return-type-one-of", true);
|
||||
}
|
||||
|
||||
if (cm.anyOf != null && !cm.anyOf.isEmpty()) {
|
||||
op.vendorExtensions.put("x-java-return-type-any-of", true);
|
||||
}
|
||||
} else {
|
||||
//LOGGER.error("cannot lookup model " + op.returnType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objs;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,14 +30,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
this.isNullable = isNullable;
|
||||
}
|
||||
|
||||
/***
|
||||
* Get the list of schemas allowed to be stored in this object
|
||||
/**
|
||||
* Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
*/
|
||||
public abstract Map<String, GenericType> getSchemas();
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the actual instance
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
@@ -45,14 +45,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
@JsonValue
|
||||
public Object getActualInstance() {return instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Set the actual instance
|
||||
*
|
||||
* @param instance the actual instance of the schema/object
|
||||
*/
|
||||
public void setActualInstance(Object instance) {this.instance = instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the schema type (e.g. anyOf, oneOf)
|
||||
*
|
||||
* @return the schema type
|
||||
@@ -101,7 +101,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Objects.hash(instance, isNullable, schemaType);
|
||||
}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Is nullalble
|
||||
*
|
||||
* @return true if it's nullable
|
||||
@@ -113,4 +113,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
{{>libraries/jersey2/additional_properties}}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ import {{invokerPackage}}.auth.ApiKeyAuth;
|
||||
{{#hasOAuthMethods}}
|
||||
import {{invokerPackage}}.auth.OAuth;
|
||||
{{/hasOAuthMethods}}
|
||||
import {{invokerPackage}}.model.AbstractOpenApiSchema;
|
||||
|
||||
{{>generatedAnnotation}}
|
||||
public class ApiClient {
|
||||
@@ -894,67 +893,6 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
|
||||
|
||||
Object result = null;
|
||||
int matchCounter = 0;
|
||||
ArrayList<String> matchSchemas = new ArrayList<>();
|
||||
|
||||
if (schema.isNullable()) {
|
||||
response.bufferEntity();
|
||||
if ("{}".equals(String.valueOf(response.readEntity(String.class))) ||
|
||||
"".equals(String.valueOf(response.readEntity(String.class)))) {
|
||||
// schema is nullable and the response body is {} or empty string
|
||||
return schema;
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, GenericType> entry : schema.getSchemas().entrySet()) {
|
||||
String schemaName = entry.getKey();
|
||||
GenericType schemaType = entry.getValue();
|
||||
|
||||
if (schemaType instanceof GenericType) { // model
|
||||
try {
|
||||
Object deserializedObject = deserialize(response, schemaType);
|
||||
if (deserializedObject != null) {
|
||||
result = deserializedObject;
|
||||
matchCounter++;
|
||||
|
||||
if ("anyOf".equals(schema.getSchemaType())) {
|
||||
break;
|
||||
} else if ("oneOf".equals(schema.getSchemaType())) {
|
||||
matchSchemas.add(schemaName);
|
||||
} else {
|
||||
throw new ApiException("Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
|
||||
}
|
||||
} else {
|
||||
// failed to deserialize the response in the schema provided, proceed to the next one if any
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// failed to deserialize, do nothing and try next one (schema)
|
||||
// Logging the error may be useful to troubleshoot why a payload fails to match
|
||||
// the schema.
|
||||
log.log(Level.FINE, "Input data does not match schema '" + schemaName + "'", ex);
|
||||
}
|
||||
} else {// unknown type
|
||||
throw new ApiException(schemaType.getClass() + " is not a GenericType and cannot be handled properly in deserialization.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) {// more than 1 match for oneOf
|
||||
throw new ApiException("Response body is invalid as it matches more than one schema (" + StringUtil.join(matchSchemas, ", ") + ") defined in the oneOf model: " + schema.getClass().getName());
|
||||
} else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas
|
||||
throw new ApiException("Response body is invalid as it does not match any schemas (" + StringUtil.join(schema.getSchemas().keySet(), ", ") + ") defined in the oneOf/anyOf model: " + schema.getClass().getName());
|
||||
} else { // only one matched
|
||||
schema.setActualInstance(result);
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deserialize response body to Java object according to the Content-Type.
|
||||
* @param <T> Type
|
||||
@@ -1062,7 +1000,6 @@ 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 schema An instance of the response that uses oneOf/anyOf
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@@ -1078,8 +1015,7 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType,
|
||||
AbstractOpenApiSchema schema)
|
||||
GenericType<T> returnType)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@@ -1178,12 +1114,10 @@ public class ApiClient {
|
||||
if (response.getStatusInfo() == Status.NO_CONTENT) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
|
||||
if (returnType == null) return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
else if (schema == null) {
|
||||
if (returnType == null) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders, deserialize(response, returnType));
|
||||
} else { // oneOf/anyOf
|
||||
return new ApiResponse<T>(
|
||||
statusCode, responseHeaders, (T) deserializeSchemas(response, schema));
|
||||
}
|
||||
} else {
|
||||
String message = "error";
|
||||
@@ -1229,8 +1163,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, AbstractOpenApiSchema schema) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, schema);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,16 @@ import com.fasterxml.jackson.datatype.joda.JodaModule;
|
||||
{{#threetenbp}}
|
||||
import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
|
||||
{{/threetenbp}}
|
||||
{{#models.0}}
|
||||
import {{modelPackage}}.*;
|
||||
{{/models.0}}
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
import javax.ws.rs.ext.ContextResolver;
|
||||
|
||||
{{>generatedAnnotation}}
|
||||
@@ -69,4 +76,197 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
||||
* @return object mapper
|
||||
*/
|
||||
public ObjectMapper getMapper() { return mapper; }
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param modelClass The class that contains the discriminator mappings.
|
||||
*/
|
||||
public static Class getClassForElement(JsonNode node, Class modelClass) {
|
||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||
if (cdm != null) {
|
||||
return cdm.getClassForElement(node, new HashSet<Class>());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper class to register the discriminator mappings.
|
||||
*/
|
||||
private static class ClassDiscriminatorMapping {
|
||||
// The model class name.
|
||||
Class modelClass;
|
||||
// The name of the discriminator property.
|
||||
String discriminatorName;
|
||||
// The discriminator mappings for a model class.
|
||||
Map<String, Class> discriminatorMappings;
|
||||
|
||||
// Constructs a new class discriminator.
|
||||
ClassDiscriminatorMapping(Class cls, String propertyName, Map<String, Class> mappings) {
|
||||
modelClass = cls;
|
||||
discriminatorName = propertyName;
|
||||
discriminatorMappings = new HashMap<String, Class>();
|
||||
if (mappings != null) {
|
||||
discriminatorMappings.putAll(mappings);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the name of the discriminator property for this model class.
|
||||
String getDiscriminatorPropertyName() {
|
||||
return discriminatorName;
|
||||
}
|
||||
|
||||
// Return the discriminator value or null if the discriminator is not
|
||||
// present in the payload.
|
||||
String getDiscriminatorValue(JsonNode node) {
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
if (discriminatorName != null) {
|
||||
// Get the value of the discriminator property, if present in the input payload.
|
||||
node = node.get(discriminatorName);
|
||||
if (node != null && node.isValueNode()) {
|
||||
String discrValue = node.asText();
|
||||
if (discrValue != null) {
|
||||
return discrValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* This function can be invoked for anyOf/oneOf composed models with discriminator mappings.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param visitedClasses The set of classes that have already been visited.
|
||||
*/
|
||||
Class getClassForElement(JsonNode node, Set<Class> visitedClasses) {
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// Class has already been visited.
|
||||
return null;
|
||||
}
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
String discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
return null;
|
||||
}
|
||||
Class cls = discriminatorMappings.get(discrValue);
|
||||
// It may not be sufficient to return this cls directly because that target class
|
||||
// may itself be a composed schema, possibly with its own discriminator.
|
||||
visitedClasses.add(modelClass);
|
||||
for (Class childClass : discriminatorMappings.values()) {
|
||||
ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass);
|
||||
if (childCdm == null) {
|
||||
continue;
|
||||
}
|
||||
if (!discriminatorName.equals(childCdm.discriminatorName)) {
|
||||
discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (childCdm != null) {
|
||||
// Recursively traverse the discriminator mappings.
|
||||
Class childDiscr = childCdm.getClassForElement(node, visitedClasses);
|
||||
if (childDiscr != null) {
|
||||
return childDiscr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy.
|
||||
*
|
||||
* The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy,
|
||||
* so it's not possible to use the instanceof keyword.
|
||||
*
|
||||
* @param modelClass A OpenAPI model class.
|
||||
* @param inst The instance object.
|
||||
*/
|
||||
public static boolean isInstanceOf(Class modelClass, Object inst, Set<Class> visitedClasses) {
|
||||
if (modelClass.isInstance(inst)) {
|
||||
// This handles the 'allOf' use case with single parent inheritance.
|
||||
return true;
|
||||
}
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// This is to prevent infinite recursion when the composed schemas have
|
||||
// a circular dependency.
|
||||
return false;
|
||||
}
|
||||
visitedClasses.add(modelClass);
|
||||
|
||||
// Traverse the oneOf/anyOf composed schemas.
|
||||
Map<String, GenericType> descendants = modelDescendants.get(modelClass);
|
||||
if (descendants != null) {
|
||||
for (GenericType childType : descendants.values()) {
|
||||
if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A map of discriminators for all model classes.
|
||||
*/
|
||||
private static Map<Class, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class, ClassDiscriminatorMapping>();
|
||||
|
||||
/**
|
||||
* A map of oneOf/anyOf descendants for each model class.
|
||||
*/
|
||||
private static Map<Class, Map<String, GenericType>> modelDescendants = new HashMap<Class, Map<String, GenericType>>();
|
||||
|
||||
/**
|
||||
* Register a model class discriminator.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param discriminatorPropertyName the name of the discriminator property
|
||||
* @param mappings a map with the discriminator mappings.
|
||||
*/
|
||||
public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map<String, Class> mappings) {
|
||||
ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings);
|
||||
modelDiscriminators.put(modelClass, m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the oneOf/anyOf descendants of the modelClass.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param descendants a map of oneOf/anyOf descendants.
|
||||
*/
|
||||
public static void registerDescendants(Class modelClass, Map<String, GenericType> descendants) {
|
||||
modelDescendants.put(modelClass, descendants);
|
||||
}
|
||||
|
||||
private static JSON json;
|
||||
|
||||
static
|
||||
{
|
||||
json = new JSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default JSON instance.
|
||||
*
|
||||
* @return the default JSON instance
|
||||
*/
|
||||
public static JSON getDefault() {
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default JSON instance.
|
||||
*
|
||||
* @param json JSON instance to be used
|
||||
*/
|
||||
public static void setDefault(JSON json) {
|
||||
JSON.json = json;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{{#additionalPropertiesType}}
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, {{{.}}}> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, {{{.}}}>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, {{{.}}}> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public {{{.}}} getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
{{/additionalPropertiesType}}
|
||||
@@ -4,21 +4,44 @@ import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}}
|
||||
@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class)
|
||||
@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class)
|
||||
public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}}, {{{.}}}{{/vendorExtensions.x-implements}} {
|
||||
private static final Logger log = Logger.getLogger({{classname}}.class.getName());
|
||||
|
||||
public static class {{classname}}Serializer extends StdSerializer<{{classname}}> {
|
||||
public {{classname}}Serializer(Class<{{classname}}> t) {
|
||||
super(t);
|
||||
}
|
||||
|
||||
public {{classname}}Serializer() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
|
||||
jgen.writeObject(value.getActualInstance());
|
||||
}
|
||||
}
|
||||
|
||||
public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> {
|
||||
public {{classname}}Deserializer() {
|
||||
this({{classname}}.class);
|
||||
@@ -33,6 +56,18 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
JsonNode tree = jp.readValueAsTree();
|
||||
|
||||
Object deserialized = null;
|
||||
{{#discriminator}}
|
||||
Class cls = JSON.getClassForElement(tree, {{classname}}.class);
|
||||
if (cls != null) {
|
||||
// When the OAS schema includes a discriminator, use the discriminator value to
|
||||
// discriminate the anyOf schemas.
|
||||
// Get the discriminator mapping value to get the class.
|
||||
deserialized = tree.traverse(jp.getCodec()).readValueAs(cls);
|
||||
{{classname}} ret = new {{classname}}();
|
||||
ret.setActualInstance(deserialized);
|
||||
return ret;
|
||||
}
|
||||
{{/discriminator}}
|
||||
{{#anyOf}}
|
||||
// deserialzie {{{.}}}
|
||||
try {
|
||||
@@ -48,6 +83,41 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
{{/anyOf}}
|
||||
throw new IOException(String.format("Failed deserialization for {{classname}}: no match found"));
|
||||
}
|
||||
|
||||
{{#additionalPropertiesType}}
|
||||
/**
|
||||
* Method called to deal with a property that did not map to a known Bean property.
|
||||
* Method can deal with the problem as it sees fit (ignore, throw exception); but if it does return,
|
||||
* it has to skip the matching Json content parser has.
|
||||
*
|
||||
* @param p - Parser that points to value of the unknown property
|
||||
* @param ctxt - Context for deserialization; allows access to the parser, error reporting functionality
|
||||
* @param instanceOrClass - Instance that is being populated by this deserializer, or if not known, Class that would be instantiated. If null, will assume type is what getValueClass() returns.
|
||||
* @param propName - Name of the property that cannot be mapped
|
||||
*/
|
||||
@Override
|
||||
protected void handleUnknownProperty(JsonParser p,
|
||||
DeserializationContext ctxt,
|
||||
Object instanceOrClass,
|
||||
String propName) throws IOException {
|
||||
System.out.println("Deserializing unknown property " + propName);
|
||||
{{{.}}} deserialized = p.readValueAs({{{.}}}.class);
|
||||
additionalProperties.put(propName, deserialized);
|
||||
}
|
||||
{{/additionalPropertiesType}}
|
||||
|
||||
/**
|
||||
* Handle deserialization of the 'null' value.
|
||||
*/
|
||||
@Override
|
||||
public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException {
|
||||
{{#isNullable}}
|
||||
return null;
|
||||
{{/isNullable}}
|
||||
{{^isNullable}}
|
||||
throw new JsonMappingException("{{classname}} cannot be null");
|
||||
{{/isNullable}}
|
||||
}
|
||||
}
|
||||
|
||||
// store a list of schema names defined in anyOf
|
||||
@@ -56,7 +126,18 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
public {{classname}}() {
|
||||
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||
}
|
||||
{{> libraries/jersey2/additional_properties }}
|
||||
{{#additionalPropertiesType}}
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return super.equals(o) && Objects.equals(this.additionalProperties, o.additionalProperties)
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(instance, isNullable, schemaType, additionalProperties);
|
||||
}
|
||||
{{/additionalPropertiesType}}
|
||||
{{#anyOf}}
|
||||
public {{classname}}({{{.}}} o) {
|
||||
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||
@@ -69,6 +150,16 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
schemas.put("{{{.}}}", new GenericType<{{{.}}}>() {
|
||||
});
|
||||
{{/anyOf}}
|
||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||
{{#discriminator}}
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
{{#mappedModels}}
|
||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||
{{/mappedModels}}
|
||||
mappings.put("{{name}}", {{classname}}.class);
|
||||
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
||||
{{/discriminator}}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -78,15 +169,15 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
|
||||
@Override
|
||||
public void setActualInstance(Object instance) {
|
||||
{{#isNulalble}}
|
||||
{{#isNullable}}
|
||||
if (instance == null) {
|
||||
super.setActualInstance(instance);
|
||||
return;
|
||||
}
|
||||
|
||||
{{/isNulalble}}
|
||||
{{/isNullable}}
|
||||
{{#anyOf}}
|
||||
if (instance instanceof {{{.}}}) {
|
||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class>())) {
|
||||
super.setActualInstance(instance);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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}}, {{#vendorExtensions.x-java-return-type-one-of}}new {{{returnType}}}(){{/vendorExtensions.x-java-return-type-one-of}}{{^vendorExtensions.x-java-return-type-one-of}}{{#vendorExtensions.x-java-return-type-any-of}}new {{{returnType}}}(){{/vendorExtensions.x-java-return-type-any-of}}{{^vendorExtensions.x-java-return-type-any-of}}null{{/vendorExtensions.x-java-return-type-any-of}}{{/vendorExtensions.x-java-return-type-one-of}});
|
||||
localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}});
|
||||
}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@ import {{invokerPackage}}.*;
|
||||
import {{invokerPackage}}.auth.*;
|
||||
{{#imports}}import {{import}};
|
||||
{{/imports}}
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
{{^fullJavaUtil}}
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -6,9 +6,21 @@ package {{package}};
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
{{/useReflectionEqualsHashCode}}
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
{{#additionalPropertiesType}}
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
{{/additionalPropertiesType}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
{{^supportJava6}}
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
{{/supportJava6}}
|
||||
{{#supportJava6}}
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@@ -39,9 +51,16 @@ import javax.validation.Valid;
|
||||
{{#performBeanValidation}}
|
||||
import org.hibernate.validator.constraints.*;
|
||||
{{/performBeanValidation}}
|
||||
import {{invokerPackage}}.JSON;
|
||||
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
{{#oneOf}}
|
||||
{{#-first}}
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
{{/-first}}
|
||||
{{/oneOf}}
|
||||
|
||||
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{#oneOf}}{{#-first}}{{>oneof_model}}{{/-first}}{{/oneOf}}{{^oneOf}}{{#anyOf}}{{#-first}}{{>anyof_model}}{{/-first}}{{/anyOf}}{{^anyOf}}{{>pojo}}{{/anyOf}}{{/oneOf}}{{/isEnum}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
||||
@@ -4,21 +4,44 @@ import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
|
||||
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>xmlAnnotation}}
|
||||
@JsonDeserialize(using={{classname}}.{{classname}}Deserializer.class)
|
||||
@JsonDeserialize(using = {{classname}}.{{classname}}Deserializer.class)
|
||||
@JsonSerialize(using = {{classname}}.{{classname}}Serializer.class)
|
||||
public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-implements}}, {{{.}}}{{/vendorExtensions.x-implements}} {
|
||||
private static final Logger log = Logger.getLogger({{classname}}.class.getName());
|
||||
|
||||
public static class {{classname}}Serializer extends StdSerializer<{{classname}}> {
|
||||
public {{classname}}Serializer(Class<{{classname}}> t) {
|
||||
super(t);
|
||||
}
|
||||
|
||||
public {{classname}}Serializer() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serialize({{classname}} value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
|
||||
jgen.writeObject(value.getActualInstance());
|
||||
}
|
||||
}
|
||||
|
||||
public static class {{classname}}Deserializer extends StdDeserializer<{{classname}}> {
|
||||
public {{classname}}Deserializer() {
|
||||
this({{classname}}.class);
|
||||
@@ -31,13 +54,33 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
@Override
|
||||
public {{classname}} deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
|
||||
JsonNode tree = jp.readValueAsTree();
|
||||
|
||||
int match = 0;
|
||||
Object deserialized = null;
|
||||
{{#useOneOfDiscriminatorLookup}}
|
||||
{{#discriminator}}
|
||||
{{classname}} new{{classname}} = new {{classname}}();
|
||||
Map<String,Object> result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference<Map<String, Object>>() {});
|
||||
String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}");
|
||||
switch (discriminatorValue) {
|
||||
{{#mappedModels}}
|
||||
case "{{{mappingName}}}":
|
||||
deserialized = tree.traverse(jp.getCodec()).readValueAs({{{modelName}}}.class);
|
||||
new{{classname}}.setActualInstance(deserialized);
|
||||
return new{{classname}};
|
||||
{{/mappedModels}}
|
||||
default:
|
||||
log.log(Level.WARNING, String.format("Failed to lookup discriminator value `%s` for {{classname}}. Possible values:{{#mappedModels}} {{{mappingName}}}{{/mappedModels}}", discriminatorValue));
|
||||
}
|
||||
|
||||
{{/discriminator}}
|
||||
{{/useOneOfDiscriminatorLookup}}
|
||||
int match = 0;
|
||||
{{#oneOf}}
|
||||
// deserialize {{{.}}}
|
||||
try {
|
||||
deserialized = tree.traverse(jp.getCodec()).readValueAs({{{.}}}.class);
|
||||
// TODO: there is no validation against JSON schema constraints
|
||||
// (min, max, enum, pattern...), this does not perform a strict JSON
|
||||
// validation, which means the 'match' count may be higher than it should be.
|
||||
match++;
|
||||
log.log(Level.FINER, "Input data matches schema '{{{.}}}'");
|
||||
} catch (Exception e) {
|
||||
@@ -53,6 +96,41 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
}
|
||||
throw new IOException(String.format("Failed deserialization for {{classname}}: %d classes match result, expected 1", match));
|
||||
}
|
||||
|
||||
{{#additionalPropertiesType}}
|
||||
/**
|
||||
* Method called to deal with a property that did not map to a known Bean property.
|
||||
* Method can deal with the problem as it sees fit (ignore, throw exception); but if it does return,
|
||||
* it has to skip the matching Json content parser has.
|
||||
*
|
||||
* @param p - Parser that points to value of the unknown property
|
||||
* @param ctxt - Context for deserialization; allows access to the parser, error reporting functionality
|
||||
* @param instanceOrClass - Instance that is being populated by this deserializer, or if not known, Class that would be instantiated. If null, will assume type is what getValueClass() returns.
|
||||
* @param propName - Name of the property that cannot be mapped
|
||||
*/
|
||||
@Override
|
||||
protected void handleUnknownProperty(JsonParser p,
|
||||
DeserializationContext ctxt,
|
||||
Object instanceOrClass,
|
||||
String propName) throws IOException {
|
||||
System.out.println("Deserializing unknown property " + propName);
|
||||
{{{.}}} deserialized = p.readValueAs({{{.}}}.class);
|
||||
additionalProperties.put(propName, deserialized);
|
||||
}
|
||||
{{/additionalPropertiesType}}
|
||||
|
||||
/**
|
||||
* Handle deserialization of the 'null' value.
|
||||
*/
|
||||
@Override
|
||||
public {{classname}} getNullValue(DeserializationContext ctxt) throws JsonMappingException {
|
||||
{{#isNullable}}
|
||||
return null;
|
||||
{{/isNullable}}
|
||||
{{^isNullable}}
|
||||
throw new JsonMappingException("{{classname}} cannot be null");
|
||||
{{/isNullable}}
|
||||
}
|
||||
}
|
||||
|
||||
// store a list of schema names defined in oneOf
|
||||
@@ -61,7 +139,18 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
public {{classname}}() {
|
||||
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||
}
|
||||
{{> libraries/jersey2/additional_properties }}
|
||||
{{#additionalPropertiesType}}
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return super.equals(o) && Objects.equals(this.additionalProperties, o.additionalProperties)
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(instance, isNullable, schemaType, additionalProperties);
|
||||
}
|
||||
{{/additionalPropertiesType}}
|
||||
{{#oneOf}}
|
||||
public {{classname}}({{{.}}} o) {
|
||||
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||
@@ -74,6 +163,16 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
schemas.put("{{{.}}}", new GenericType<{{{.}}}>() {
|
||||
});
|
||||
{{/oneOf}}
|
||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||
{{#discriminator}}
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
{{#mappedModels}}
|
||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||
{{/mappedModels}}
|
||||
mappings.put("{{name}}", {{classname}}.class);
|
||||
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
||||
{{/discriminator}}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,17 +180,24 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
||||
return {{classname}}.schemas;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the instance that matches the oneOf child schema, check
|
||||
* the instance parameter is valid against the oneOf child schemas.
|
||||
*
|
||||
* It could be an instance of the 'oneOf' schemas.
|
||||
* The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf).
|
||||
*/
|
||||
@Override
|
||||
public void setActualInstance(Object instance) {
|
||||
{{#isNulalble}}
|
||||
{{#isNullable}}
|
||||
if (instance == null) {
|
||||
super.setActualInstance(instance);
|
||||
return;
|
||||
}
|
||||
|
||||
{{/isNulalble}}
|
||||
{{/isNullable}}
|
||||
{{#oneOf}}
|
||||
if (instance instanceof {{{.}}}) {
|
||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class>())) {
|
||||
super.setActualInstance(instance);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -99,8 +99,12 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
|
||||
{{^isReadOnly}}
|
||||
public {{classname}} {{name}}({{{datatypeWithEnum}}} {{name}}) {
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{^vendorExtensions.x-is-jackson-optional-nullable}}this.{{name}} = {{name}};{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{#vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}});
|
||||
{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
{{^vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
this.{{name}} = {{name}};
|
||||
{{/vendorExtensions.x-is-jackson-optional-nullable}}
|
||||
return this;
|
||||
}
|
||||
{{#isListContainer}}
|
||||
@@ -226,7 +230,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
{{/isReadOnly}}
|
||||
|
||||
{{/vars}}
|
||||
|
||||
{{>libraries/jersey2/additional_properties}}
|
||||
{{^supportJava6}}
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -242,7 +246,8 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
}{{#hasVars}}
|
||||
{{classname}} {{classVarName}} = ({{classname}}) o;
|
||||
return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{^isByteArray}}Objects{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{name}}){{#hasMore}} &&
|
||||
{{/hasMore}}{{/vars}}{{#parent}} &&
|
||||
{{/hasMore}}{{/vars}}{{#additionalPropertiesType}}&&
|
||||
Objects.equals(this.additionalProperties, {{classVarName}}.additionalProperties){{/additionalPropertiesType}}{{#parent}} &&
|
||||
super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}}
|
||||
return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}}
|
||||
{{/useReflectionEqualsHashCode}}
|
||||
@@ -254,7 +259,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
{{/useReflectionEqualsHashCode}}
|
||||
{{^useReflectionEqualsHashCode}}
|
||||
return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}});
|
||||
return Objects.hash({{#vars}}{{^isByteArray}}{{name}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}{{#additionalPropertiesType}}, additionalProperties{{/additionalPropertiesType}});
|
||||
{{/useReflectionEqualsHashCode}}
|
||||
}
|
||||
|
||||
@@ -292,6 +297,9 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
{{#vars}}
|
||||
sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n");
|
||||
{{/vars}}
|
||||
{{#additionalPropertiesType}}
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
{{/additionalPropertiesType}}
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
@@ -366,4 +374,15 @@ public class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{{#vendorE
|
||||
}
|
||||
};
|
||||
{{/parcelableModel}}
|
||||
{{#discriminator}}
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
{{#mappedModels}}
|
||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||
{{/mappedModels}}
|
||||
mappings.put("{{name}}", {{classname}}.class);
|
||||
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
||||
}
|
||||
{{/discriminator}}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -55,7 +55,6 @@ import org.openapitools.client.auth.HttpBasicAuth;
|
||||
import org.openapitools.client.auth.HttpBearerAuth;
|
||||
import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
import org.openapitools.client.model.AbstractOpenApiSchema;
|
||||
|
||||
|
||||
public class ApiClient {
|
||||
@@ -811,67 +810,6 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
|
||||
|
||||
Object result = null;
|
||||
int matchCounter = 0;
|
||||
ArrayList<String> matchSchemas = new ArrayList<>();
|
||||
|
||||
if (schema.isNullable()) {
|
||||
response.bufferEntity();
|
||||
if ("{}".equals(String.valueOf(response.readEntity(String.class))) ||
|
||||
"".equals(String.valueOf(response.readEntity(String.class)))) {
|
||||
// schema is nullable and the response body is {} or empty string
|
||||
return schema;
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, GenericType> entry : schema.getSchemas().entrySet()) {
|
||||
String schemaName = entry.getKey();
|
||||
GenericType schemaType = entry.getValue();
|
||||
|
||||
if (schemaType instanceof GenericType) { // model
|
||||
try {
|
||||
Object deserializedObject = deserialize(response, schemaType);
|
||||
if (deserializedObject != null) {
|
||||
result = deserializedObject;
|
||||
matchCounter++;
|
||||
|
||||
if ("anyOf".equals(schema.getSchemaType())) {
|
||||
break;
|
||||
} else if ("oneOf".equals(schema.getSchemaType())) {
|
||||
matchSchemas.add(schemaName);
|
||||
} else {
|
||||
throw new ApiException("Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
|
||||
}
|
||||
} else {
|
||||
// failed to deserialize the response in the schema provided, proceed to the next one if any
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// failed to deserialize, do nothing and try next one (schema)
|
||||
// Logging the error may be useful to troubleshoot why a payload fails to match
|
||||
// the schema.
|
||||
log.log(Level.FINE, "Input data does not match schema '" + schemaName + "'", ex);
|
||||
}
|
||||
} else {// unknown type
|
||||
throw new ApiException(schemaType.getClass() + " is not a GenericType and cannot be handled properly in deserialization.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) {// more than 1 match for oneOf
|
||||
throw new ApiException("Response body is invalid as it matches more than one schema (" + StringUtil.join(matchSchemas, ", ") + ") defined in the oneOf model: " + schema.getClass().getName());
|
||||
} else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas
|
||||
throw new ApiException("Response body is invalid as it does not match any schemas (" + StringUtil.join(schema.getSchemas().keySet(), ", ") + ") defined in the oneOf/anyOf model: " + schema.getClass().getName());
|
||||
} else { // only one matched
|
||||
schema.setActualInstance(result);
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deserialize response body to Java object according to the Content-Type.
|
||||
* @param <T> Type
|
||||
@@ -973,7 +911,6 @@ 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 schema An instance of the response that uses oneOf/anyOf
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@@ -989,8 +926,7 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType,
|
||||
AbstractOpenApiSchema schema)
|
||||
GenericType<T> returnType)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@@ -1087,12 +1023,10 @@ public class ApiClient {
|
||||
if (response.getStatusInfo() == Status.NO_CONTENT) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
|
||||
if (returnType == null) return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
else if (schema == null) {
|
||||
if (returnType == null) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders, deserialize(response, returnType));
|
||||
} else { // oneOf/anyOf
|
||||
return new ApiResponse<T>(
|
||||
statusCode, responseHeaders, (T) deserializeSchemas(response, schema));
|
||||
}
|
||||
} else {
|
||||
String message = "error";
|
||||
@@ -1138,8 +1072,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, AbstractOpenApiSchema schema) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, schema);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,9 +4,14 @@ import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import org.openapitools.jackson.nullable.JsonNullableModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.openapitools.client.model.*;
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
import javax.ws.rs.ext.ContextResolver;
|
||||
|
||||
|
||||
@@ -46,4 +51,197 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
||||
* @return object mapper
|
||||
*/
|
||||
public ObjectMapper getMapper() { return mapper; }
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param modelClass The class that contains the discriminator mappings.
|
||||
*/
|
||||
public static Class getClassForElement(JsonNode node, Class modelClass) {
|
||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||
if (cdm != null) {
|
||||
return cdm.getClassForElement(node, new HashSet<Class>());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper class to register the discriminator mappings.
|
||||
*/
|
||||
private static class ClassDiscriminatorMapping {
|
||||
// The model class name.
|
||||
Class modelClass;
|
||||
// The name of the discriminator property.
|
||||
String discriminatorName;
|
||||
// The discriminator mappings for a model class.
|
||||
Map<String, Class> discriminatorMappings;
|
||||
|
||||
// Constructs a new class discriminator.
|
||||
ClassDiscriminatorMapping(Class cls, String propertyName, Map<String, Class> mappings) {
|
||||
modelClass = cls;
|
||||
discriminatorName = propertyName;
|
||||
discriminatorMappings = new HashMap<String, Class>();
|
||||
if (mappings != null) {
|
||||
discriminatorMappings.putAll(mappings);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the name of the discriminator property for this model class.
|
||||
String getDiscriminatorPropertyName() {
|
||||
return discriminatorName;
|
||||
}
|
||||
|
||||
// Return the discriminator value or null if the discriminator is not
|
||||
// present in the payload.
|
||||
String getDiscriminatorValue(JsonNode node) {
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
if (discriminatorName != null) {
|
||||
// Get the value of the discriminator property, if present in the input payload.
|
||||
node = node.get(discriminatorName);
|
||||
if (node != null && node.isValueNode()) {
|
||||
String discrValue = node.asText();
|
||||
if (discrValue != null) {
|
||||
return discrValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* This function can be invoked for anyOf/oneOf composed models with discriminator mappings.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param visitedClasses The set of classes that have already been visited.
|
||||
*/
|
||||
Class getClassForElement(JsonNode node, Set<Class> visitedClasses) {
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// Class has already been visited.
|
||||
return null;
|
||||
}
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
String discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
return null;
|
||||
}
|
||||
Class cls = discriminatorMappings.get(discrValue);
|
||||
// It may not be sufficient to return this cls directly because that target class
|
||||
// may itself be a composed schema, possibly with its own discriminator.
|
||||
visitedClasses.add(modelClass);
|
||||
for (Class childClass : discriminatorMappings.values()) {
|
||||
ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass);
|
||||
if (childCdm == null) {
|
||||
continue;
|
||||
}
|
||||
if (!discriminatorName.equals(childCdm.discriminatorName)) {
|
||||
discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (childCdm != null) {
|
||||
// Recursively traverse the discriminator mappings.
|
||||
Class childDiscr = childCdm.getClassForElement(node, visitedClasses);
|
||||
if (childDiscr != null) {
|
||||
return childDiscr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy.
|
||||
*
|
||||
* The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy,
|
||||
* so it's not possible to use the instanceof keyword.
|
||||
*
|
||||
* @param modelClass A OpenAPI model class.
|
||||
* @param inst The instance object.
|
||||
*/
|
||||
public static boolean isInstanceOf(Class modelClass, Object inst, Set<Class> visitedClasses) {
|
||||
if (modelClass.isInstance(inst)) {
|
||||
// This handles the 'allOf' use case with single parent inheritance.
|
||||
return true;
|
||||
}
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// This is to prevent infinite recursion when the composed schemas have
|
||||
// a circular dependency.
|
||||
return false;
|
||||
}
|
||||
visitedClasses.add(modelClass);
|
||||
|
||||
// Traverse the oneOf/anyOf composed schemas.
|
||||
Map<String, GenericType> descendants = modelDescendants.get(modelClass);
|
||||
if (descendants != null) {
|
||||
for (GenericType childType : descendants.values()) {
|
||||
if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A map of discriminators for all model classes.
|
||||
*/
|
||||
private static Map<Class, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class, ClassDiscriminatorMapping>();
|
||||
|
||||
/**
|
||||
* A map of oneOf/anyOf descendants for each model class.
|
||||
*/
|
||||
private static Map<Class, Map<String, GenericType>> modelDescendants = new HashMap<Class, Map<String, GenericType>>();
|
||||
|
||||
/**
|
||||
* Register a model class discriminator.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param discriminatorPropertyName the name of the discriminator property
|
||||
* @param mappings a map with the discriminator mappings.
|
||||
*/
|
||||
public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map<String, Class> mappings) {
|
||||
ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings);
|
||||
modelDiscriminators.put(modelClass, m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the oneOf/anyOf descendants of the modelClass.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param descendants a map of oneOf/anyOf descendants.
|
||||
*/
|
||||
public static void registerDescendants(Class modelClass, Map<String, GenericType> descendants) {
|
||||
modelDescendants.put(modelClass, descendants);
|
||||
}
|
||||
|
||||
private static JSON json;
|
||||
|
||||
static
|
||||
{
|
||||
json = new JSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default JSON instance.
|
||||
*
|
||||
* @return the default JSON instance
|
||||
*/
|
||||
public static JSON getDefault() {
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default JSON instance.
|
||||
*
|
||||
* @param json JSON instance to be used
|
||||
*/
|
||||
public static void setDefault(JSON json) {
|
||||
JSON.json = json;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,6 @@ public class AnotherFakeApi {
|
||||
|
||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.createXmlItem", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -177,7 +177,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -239,7 +239,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -301,7 +301,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -363,7 +363,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -427,7 +427,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -499,7 +499,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
|
||||
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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
|
||||
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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -1195,6 +1195,6 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,6 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,14 +41,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
this.isNullable = isNullable;
|
||||
}
|
||||
|
||||
/***
|
||||
* Get the list of schemas allowed to be stored in this object
|
||||
/**
|
||||
* Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
*/
|
||||
public abstract Map<String, GenericType> getSchemas();
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the actual instance
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
@@ -56,14 +56,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
@JsonValue
|
||||
public Object getActualInstance() {return instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Set the actual instance
|
||||
*
|
||||
* @param instance the actual instance of the schema/object
|
||||
*/
|
||||
public void setActualInstance(Object instance) {this.instance = instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the schema type (e.g. anyOf, oneOf)
|
||||
*
|
||||
* @return the schema type
|
||||
@@ -112,7 +112,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Objects.hash(instance, isNullable, schemaType);
|
||||
}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Is nullalble
|
||||
*
|
||||
* @return true if it's nullable
|
||||
@@ -124,4 +124,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -13,17 +13,23 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesAnyType
|
||||
@@ -32,13 +38,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
public class AdditionalPropertiesAnyType {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -61,6 +66,43 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Object> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Object>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -71,13 +113,13 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
|
||||
return Objects.equals(this.name, additionalPropertiesAnyType.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesAnyType.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesAnyType.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +127,8 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesAnyType {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -13,18 +13,24 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesArray
|
||||
@@ -33,13 +39,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesArray.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
public class AdditionalPropertiesArray {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -62,6 +67,43 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, List> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesArray putAdditionalProperty(String key, List value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, List>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, List> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public List getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -72,13 +114,13 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
|
||||
return Objects.equals(this.name, additionalPropertiesArray.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesArray.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesArray.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,8 +128,8 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesArray {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -13,17 +13,23 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesBoolean
|
||||
@@ -32,13 +38,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
public class AdditionalPropertiesBoolean {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -61,6 +66,43 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Boolean> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Boolean>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Boolean> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Boolean getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -71,13 +113,13 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
|
||||
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesBoolean.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesBoolean.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +127,8 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesBoolean {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
@@ -80,7 +84,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
||||
this.mapString = mapString;
|
||||
return this;
|
||||
}
|
||||
@@ -113,7 +116,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
|
||||
|
||||
this.mapNumber = mapNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -146,7 +148,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
|
||||
|
||||
this.mapInteger = mapInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -179,7 +180,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
|
||||
|
||||
this.mapBoolean = mapBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -212,7 +212,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
|
||||
|
||||
this.mapArrayInteger = mapArrayInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -245,7 +244,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
|
||||
|
||||
this.mapArrayAnytype = mapArrayAnytype;
|
||||
return this;
|
||||
}
|
||||
@@ -278,7 +276,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
|
||||
|
||||
this.mapMapString = mapMapString;
|
||||
return this;
|
||||
}
|
||||
@@ -311,7 +308,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
|
||||
|
||||
this.mapMapAnytype = mapMapAnytype;
|
||||
return this;
|
||||
}
|
||||
@@ -344,7 +340,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass anytype1(Object anytype1) {
|
||||
|
||||
this.anytype1 = anytype1;
|
||||
return this;
|
||||
}
|
||||
@@ -369,7 +364,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass anytype2(Object anytype2) {
|
||||
|
||||
this.anytype2 = anytype2;
|
||||
return this;
|
||||
}
|
||||
@@ -394,7 +388,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass anytype3(Object anytype3) {
|
||||
|
||||
this.anytype3 = anytype3;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -13,17 +13,23 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesInteger
|
||||
@@ -32,13 +38,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
public class AdditionalPropertiesInteger {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -61,6 +66,43 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Integer> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Integer>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Integer> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Integer getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -71,13 +113,13 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
|
||||
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesInteger.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesInteger.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +127,8 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesInteger {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -13,8 +13,14 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,9 +28,9 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesNumber
|
||||
@@ -33,13 +39,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
public class AdditionalPropertiesNumber {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -62,6 +67,43 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, BigDecimal> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, BigDecimal>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, BigDecimal> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public BigDecimal getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -72,13 +114,13 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
|
||||
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesNumber.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesNumber.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,8 +128,8 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesNumber {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -13,17 +13,24 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesObject
|
||||
@@ -32,13 +39,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesObject.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
public class AdditionalPropertiesObject {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -61,6 +67,43 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Map> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Map>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, Map> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Map getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -71,13 +114,13 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
|
||||
return Objects.equals(this.name, additionalPropertiesObject.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesObject.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesObject.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +128,8 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesObject {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -13,17 +13,23 @@
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesString
|
||||
@@ -32,13 +38,12 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
AdditionalPropertiesString.JSON_PROPERTY_NAME
|
||||
})
|
||||
|
||||
public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
public class AdditionalPropertiesString {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -61,6 +66,43 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, String> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
@JsonAnySetter
|
||||
public AdditionalPropertiesString putAdditionalProperty(String key, String value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, String>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
@JsonAnyGetter
|
||||
public Map<String, String> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public String getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
@@ -71,13 +113,13 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
return false;
|
||||
}
|
||||
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
|
||||
return Objects.equals(this.name, additionalPropertiesString.name) &&
|
||||
super.equals(o);
|
||||
return Objects.equals(this.name, additionalPropertiesString.name)&&
|
||||
Objects.equals(this.additionalProperties, additionalPropertiesString.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, super.hashCode());
|
||||
return Objects.hash(name, additionalProperties);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +127,8 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class AdditionalPropertiesString {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -27,6 +29,8 @@ import org.openapitools.client.model.BigCat;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.openapitools.client.model.Dog;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Animal
|
||||
@@ -52,7 +56,6 @@ public class Animal {
|
||||
|
||||
|
||||
public Animal className(String className) {
|
||||
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
@@ -76,7 +79,6 @@ public class Animal {
|
||||
|
||||
|
||||
public Animal color(String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
@@ -140,5 +142,14 @@ public class Animal {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("BigCat", BigCat.class);
|
||||
mappings.put("Cat", Cat.class);
|
||||
mappings.put("Dog", Dog.class);
|
||||
mappings.put("Animal", Animal.class);
|
||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
@@ -39,7 +43,6 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
@@ -39,7 +43,6 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
this.arrayNumber = arrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.ReadOnlyFirst;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
@@ -47,7 +51,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
this.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
}
|
||||
@@ -80,7 +83,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
|
||||
|
||||
this.arrayArrayOfInteger = arrayArrayOfInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -113,7 +115,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
|
||||
|
||||
this.arrayArrayOfModel = arrayArrayOfModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.BigCatAllOf;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* BigCat
|
||||
@@ -83,7 +87,6 @@ public class BigCat extends Cat {
|
||||
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
@@ -147,5 +150,11 @@ public class BigCat extends Cat {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("BigCat", BigCat.class);
|
||||
JSON.registerDiscriminator(BigCat.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* BigCatAllOf
|
||||
@@ -75,7 +79,6 @@ public class BigCatAllOf {
|
||||
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
this.kind = kind;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Capitalization
|
||||
@@ -56,7 +60,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
||||
this.smallCamel = smallCamel;
|
||||
return this;
|
||||
}
|
||||
@@ -81,7 +84,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization capitalCamel(String capitalCamel) {
|
||||
|
||||
this.capitalCamel = capitalCamel;
|
||||
return this;
|
||||
}
|
||||
@@ -106,7 +108,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization smallSnake(String smallSnake) {
|
||||
|
||||
this.smallSnake = smallSnake;
|
||||
return this;
|
||||
}
|
||||
@@ -131,7 +132,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization capitalSnake(String capitalSnake) {
|
||||
|
||||
this.capitalSnake = capitalSnake;
|
||||
return this;
|
||||
}
|
||||
@@ -156,7 +156,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
|
||||
|
||||
this.scAETHFlowPoints = scAETHFlowPoints;
|
||||
return this;
|
||||
}
|
||||
@@ -181,7 +180,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization ATT_NAME(String ATT_NAME) {
|
||||
|
||||
this.ATT_NAME = ATT_NAME;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -27,6 +29,8 @@ import org.openapitools.client.model.Animal;
|
||||
import org.openapitools.client.model.BigCat;
|
||||
import org.openapitools.client.model.CatAllOf;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Cat
|
||||
@@ -46,7 +50,6 @@ public class Cat extends Animal {
|
||||
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
@@ -110,5 +113,12 @@ public class Cat extends Animal {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("BigCat", BigCat.class);
|
||||
mappings.put("Cat", Cat.class);
|
||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* CatAllOf
|
||||
@@ -36,7 +40,6 @@ public class CatAllOf {
|
||||
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Category
|
||||
@@ -40,7 +44,6 @@ public class Category {
|
||||
|
||||
|
||||
public Category id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -65,7 +68,6 @@ public class Category {
|
||||
|
||||
|
||||
public Category name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing model with \"_class\" property
|
||||
@@ -37,7 +41,6 @@ public class ClassModel {
|
||||
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Client
|
||||
@@ -36,7 +40,6 @@ public class Client {
|
||||
|
||||
|
||||
public Client client(String client) {
|
||||
|
||||
this.client = client;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Animal;
|
||||
import org.openapitools.client.model.DogAllOf;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Dog
|
||||
@@ -44,7 +48,6 @@ public class Dog extends Animal {
|
||||
|
||||
|
||||
public Dog breed(String breed) {
|
||||
|
||||
this.breed = breed;
|
||||
return this;
|
||||
}
|
||||
@@ -108,5 +111,11 @@ public class Dog extends Animal {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("Dog", Dog.class);
|
||||
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* DogAllOf
|
||||
@@ -36,7 +40,6 @@ public class DogAllOf {
|
||||
|
||||
|
||||
public DogAllOf breed(String breed) {
|
||||
|
||||
this.breed = breed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -24,6 +26,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* EnumArrays
|
||||
@@ -112,7 +116,6 @@ public class EnumArrays {
|
||||
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
||||
this.justSymbol = justSymbol;
|
||||
return this;
|
||||
}
|
||||
@@ -137,7 +140,6 @@ public class EnumArrays {
|
||||
|
||||
|
||||
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
|
||||
|
||||
this.arrayEnum = arrayEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,11 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.OuterEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* EnumTest
|
||||
@@ -197,7 +201,6 @@ public class EnumTest {
|
||||
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
|
||||
this.enumString = enumString;
|
||||
return this;
|
||||
}
|
||||
@@ -222,7 +225,6 @@ public class EnumTest {
|
||||
|
||||
|
||||
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
|
||||
|
||||
this.enumStringRequired = enumStringRequired;
|
||||
return this;
|
||||
}
|
||||
@@ -246,7 +248,6 @@ public class EnumTest {
|
||||
|
||||
|
||||
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||
|
||||
this.enumInteger = enumInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -271,7 +272,6 @@ public class EnumTest {
|
||||
|
||||
|
||||
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
|
||||
|
||||
this.enumNumber = enumNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -296,7 +296,6 @@ public class EnumTest {
|
||||
|
||||
|
||||
public EnumTest outerEnum(OuterEnum outerEnum) {
|
||||
|
||||
this.outerEnum = outerEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -24,6 +26,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* FileSchemaTestClass
|
||||
@@ -42,7 +46,6 @@ public class FileSchemaTestClass {
|
||||
|
||||
|
||||
public FileSchemaTestClass file(java.io.File file) {
|
||||
|
||||
this.file = file;
|
||||
return this;
|
||||
}
|
||||
@@ -67,7 +70,6 @@ public class FileSchemaTestClass {
|
||||
|
||||
|
||||
public FileSchemaTestClass files(List<java.io.File> files) {
|
||||
|
||||
this.files = files;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -27,6 +29,8 @@ import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.util.UUID;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* FormatTest
|
||||
@@ -93,7 +97,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
|
||||
this.integer = integer;
|
||||
return this;
|
||||
}
|
||||
@@ -120,7 +123,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest int32(Integer int32) {
|
||||
|
||||
this.int32 = int32;
|
||||
return this;
|
||||
}
|
||||
@@ -147,7 +149,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest int64(Long int64) {
|
||||
|
||||
this.int64 = int64;
|
||||
return this;
|
||||
}
|
||||
@@ -172,7 +173,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest number(BigDecimal number) {
|
||||
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
@@ -198,7 +198,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest _float(Float _float) {
|
||||
|
||||
this._float = _float;
|
||||
return this;
|
||||
}
|
||||
@@ -225,7 +224,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest _double(Double _double) {
|
||||
|
||||
this._double = _double;
|
||||
return this;
|
||||
}
|
||||
@@ -252,7 +250,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest string(String string) {
|
||||
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
@@ -277,7 +274,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest _byte(byte[] _byte) {
|
||||
|
||||
this._byte = _byte;
|
||||
return this;
|
||||
}
|
||||
@@ -301,7 +297,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest binary(File binary) {
|
||||
|
||||
this.binary = binary;
|
||||
return this;
|
||||
}
|
||||
@@ -326,7 +321,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest date(LocalDate date) {
|
||||
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
@@ -350,7 +344,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest dateTime(OffsetDateTime dateTime) {
|
||||
|
||||
this.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
@@ -375,7 +368,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest uuid(UUID uuid) {
|
||||
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
@@ -400,7 +392,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest password(String password) {
|
||||
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
@@ -424,7 +415,6 @@ public class FormatTest {
|
||||
|
||||
|
||||
public FormatTest bigDecimal(BigDecimal bigDecimal) {
|
||||
|
||||
this.bigDecimal = bigDecimal;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* HasOnlyReadOnly
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
@@ -86,7 +90,6 @@ public class MapTest {
|
||||
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
return this;
|
||||
}
|
||||
@@ -119,7 +122,6 @@ public class MapTest {
|
||||
|
||||
|
||||
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
|
||||
|
||||
this.mapOfEnumString = mapOfEnumString;
|
||||
return this;
|
||||
}
|
||||
@@ -152,7 +154,6 @@ public class MapTest {
|
||||
|
||||
|
||||
public MapTest directMap(Map<String, Boolean> directMap) {
|
||||
|
||||
this.directMap = directMap;
|
||||
return this;
|
||||
}
|
||||
@@ -185,7 +186,6 @@ public class MapTest {
|
||||
|
||||
|
||||
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
|
||||
|
||||
this.indirectMap = indirectMap;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -28,6 +30,8 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.openapitools.client.model.Animal;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
@@ -50,7 +54,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
@@ -75,7 +78,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) {
|
||||
|
||||
this.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
@@ -100,7 +102,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
|
||||
|
||||
this.map = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
@@ -41,7 +45,6 @@ public class Model200Response {
|
||||
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -66,7 +69,6 @@ public class Model200Response {
|
||||
|
||||
|
||||
public Model200Response propertyClass(String propertyClass) {
|
||||
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ModelApiResponse
|
||||
@@ -44,7 +48,6 @@ public class ModelApiResponse {
|
||||
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
@@ -69,7 +72,6 @@ public class ModelApiResponse {
|
||||
|
||||
|
||||
public ModelApiResponse type(String type) {
|
||||
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
@@ -94,7 +96,6 @@ public class ModelApiResponse {
|
||||
|
||||
|
||||
public ModelApiResponse message(String message) {
|
||||
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
@@ -37,7 +41,6 @@ public class ModelReturn {
|
||||
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
||||
this._return = _return;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing model name same as property name
|
||||
@@ -49,7 +53,6 @@ public class Name {
|
||||
|
||||
|
||||
public Name name(Integer name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -89,7 +92,6 @@ public class Name {
|
||||
|
||||
|
||||
public Name property(String property) {
|
||||
|
||||
this.property = property;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* NumberOnly
|
||||
@@ -37,7 +41,6 @@ public class NumberOnly {
|
||||
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
||||
this.justNumber = justNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.OffsetDateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Order
|
||||
@@ -94,7 +98,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -119,7 +122,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order petId(Long petId) {
|
||||
|
||||
this.petId = petId;
|
||||
return this;
|
||||
}
|
||||
@@ -144,7 +146,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order quantity(Integer quantity) {
|
||||
|
||||
this.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
@@ -169,7 +170,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order shipDate(OffsetDateTime shipDate) {
|
||||
|
||||
this.shipDate = shipDate;
|
||||
return this;
|
||||
}
|
||||
@@ -194,7 +194,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order status(StatusEnum status) {
|
||||
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
@@ -219,7 +218,6 @@ public class Order {
|
||||
|
||||
|
||||
public Order complete(Boolean complete) {
|
||||
|
||||
this.complete = complete;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
@@ -45,7 +49,6 @@ public class OuterComposite {
|
||||
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
||||
this.myNumber = myNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -70,7 +73,6 @@ public class OuterComposite {
|
||||
|
||||
|
||||
public OuterComposite myString(String myString) {
|
||||
|
||||
this.myString = myString;
|
||||
return this;
|
||||
}
|
||||
@@ -95,7 +97,6 @@ public class OuterComposite {
|
||||
|
||||
|
||||
public OuterComposite myBoolean(Boolean myBoolean) {
|
||||
|
||||
this.myBoolean = myBoolean;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,11 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -28,6 +30,8 @@ import java.util.Set;
|
||||
import org.openapitools.client.model.Category;
|
||||
import org.openapitools.client.model.Tag;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Pet
|
||||
@@ -99,7 +103,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -124,7 +127,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet category(Category category) {
|
||||
|
||||
this.category = category;
|
||||
return this;
|
||||
}
|
||||
@@ -149,7 +151,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -173,7 +174,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet photoUrls(Set<String> photoUrls) {
|
||||
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
}
|
||||
@@ -202,7 +202,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet tags(List<Tag> tags) {
|
||||
|
||||
this.tags = tags;
|
||||
return this;
|
||||
}
|
||||
@@ -235,7 +234,6 @@ public class Pet {
|
||||
|
||||
|
||||
public Pet status(StatusEnum status) {
|
||||
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
@@ -56,7 +60,6 @@ public class ReadOnlyFirst {
|
||||
|
||||
|
||||
public ReadOnlyFirst baz(String baz) {
|
||||
|
||||
this.baz = baz;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* SpecialModelName
|
||||
@@ -36,7 +40,6 @@ public class SpecialModelName {
|
||||
|
||||
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
||||
this.$specialPropertyName = $specialPropertyName;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Tag
|
||||
@@ -40,7 +44,6 @@ public class Tag {
|
||||
|
||||
|
||||
public Tag id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -65,7 +68,6 @@ public class Tag {
|
||||
|
||||
|
||||
public Tag name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* TypeHolderDefault
|
||||
@@ -55,7 +59,6 @@ public class TypeHolderDefault {
|
||||
|
||||
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
|
||||
this.stringItem = stringItem;
|
||||
return this;
|
||||
}
|
||||
@@ -79,7 +82,6 @@ public class TypeHolderDefault {
|
||||
|
||||
|
||||
public TypeHolderDefault numberItem(BigDecimal numberItem) {
|
||||
|
||||
this.numberItem = numberItem;
|
||||
return this;
|
||||
}
|
||||
@@ -103,7 +105,6 @@ public class TypeHolderDefault {
|
||||
|
||||
|
||||
public TypeHolderDefault integerItem(Integer integerItem) {
|
||||
|
||||
this.integerItem = integerItem;
|
||||
return this;
|
||||
}
|
||||
@@ -127,7 +128,6 @@ public class TypeHolderDefault {
|
||||
|
||||
|
||||
public TypeHolderDefault boolItem(Boolean boolItem) {
|
||||
|
||||
this.boolItem = boolItem;
|
||||
return this;
|
||||
}
|
||||
@@ -151,7 +151,6 @@ public class TypeHolderDefault {
|
||||
|
||||
|
||||
public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
|
||||
|
||||
this.arrayItem = arrayItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* TypeHolderExample
|
||||
@@ -59,7 +63,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample stringItem(String stringItem) {
|
||||
|
||||
this.stringItem = stringItem;
|
||||
return this;
|
||||
}
|
||||
@@ -83,7 +86,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample numberItem(BigDecimal numberItem) {
|
||||
|
||||
this.numberItem = numberItem;
|
||||
return this;
|
||||
}
|
||||
@@ -107,7 +109,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample floatItem(Float floatItem) {
|
||||
|
||||
this.floatItem = floatItem;
|
||||
return this;
|
||||
}
|
||||
@@ -131,7 +132,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample integerItem(Integer integerItem) {
|
||||
|
||||
this.integerItem = integerItem;
|
||||
return this;
|
||||
}
|
||||
@@ -155,7 +155,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample boolItem(Boolean boolItem) {
|
||||
|
||||
this.boolItem = boolItem;
|
||||
return this;
|
||||
}
|
||||
@@ -179,7 +178,6 @@ public class TypeHolderExample {
|
||||
|
||||
|
||||
public TypeHolderExample arrayItem(List<Integer> arrayItem) {
|
||||
|
||||
this.arrayItem = arrayItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* User
|
||||
@@ -64,7 +68,6 @@ public class User {
|
||||
|
||||
|
||||
public User id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -89,7 +92,6 @@ public class User {
|
||||
|
||||
|
||||
public User username(String username) {
|
||||
|
||||
this.username = username;
|
||||
return this;
|
||||
}
|
||||
@@ -114,7 +116,6 @@ public class User {
|
||||
|
||||
|
||||
public User firstName(String firstName) {
|
||||
|
||||
this.firstName = firstName;
|
||||
return this;
|
||||
}
|
||||
@@ -139,7 +140,6 @@ public class User {
|
||||
|
||||
|
||||
public User lastName(String lastName) {
|
||||
|
||||
this.lastName = lastName;
|
||||
return this;
|
||||
}
|
||||
@@ -164,7 +164,6 @@ public class User {
|
||||
|
||||
|
||||
public User email(String email) {
|
||||
|
||||
this.email = email;
|
||||
return this;
|
||||
}
|
||||
@@ -189,7 +188,6 @@ public class User {
|
||||
|
||||
|
||||
public User password(String password) {
|
||||
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
@@ -214,7 +212,6 @@ public class User {
|
||||
|
||||
|
||||
public User phone(String phone) {
|
||||
|
||||
this.phone = phone;
|
||||
return this;
|
||||
}
|
||||
@@ -239,7 +236,6 @@ public class User {
|
||||
|
||||
|
||||
public User userStatus(Integer userStatus) {
|
||||
|
||||
this.userStatus = userStatus;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* XmlItem
|
||||
@@ -151,7 +155,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
|
||||
this.attributeString = attributeString;
|
||||
return this;
|
||||
}
|
||||
@@ -176,7 +179,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem attributeNumber(BigDecimal attributeNumber) {
|
||||
|
||||
this.attributeNumber = attributeNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -201,7 +203,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem attributeInteger(Integer attributeInteger) {
|
||||
|
||||
this.attributeInteger = attributeInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -226,7 +227,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem attributeBoolean(Boolean attributeBoolean) {
|
||||
|
||||
this.attributeBoolean = attributeBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -251,7 +251,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem wrappedArray(List<Integer> wrappedArray) {
|
||||
|
||||
this.wrappedArray = wrappedArray;
|
||||
return this;
|
||||
}
|
||||
@@ -284,7 +283,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameString(String nameString) {
|
||||
|
||||
this.nameString = nameString;
|
||||
return this;
|
||||
}
|
||||
@@ -309,7 +307,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameNumber(BigDecimal nameNumber) {
|
||||
|
||||
this.nameNumber = nameNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -334,7 +331,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameInteger(Integer nameInteger) {
|
||||
|
||||
this.nameInteger = nameInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -359,7 +355,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameBoolean(Boolean nameBoolean) {
|
||||
|
||||
this.nameBoolean = nameBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -384,7 +379,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameArray(List<Integer> nameArray) {
|
||||
|
||||
this.nameArray = nameArray;
|
||||
return this;
|
||||
}
|
||||
@@ -417,7 +411,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) {
|
||||
|
||||
this.nameWrappedArray = nameWrappedArray;
|
||||
return this;
|
||||
}
|
||||
@@ -450,7 +443,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixString(String prefixString) {
|
||||
|
||||
this.prefixString = prefixString;
|
||||
return this;
|
||||
}
|
||||
@@ -475,7 +467,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNumber(BigDecimal prefixNumber) {
|
||||
|
||||
this.prefixNumber = prefixNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -500,7 +491,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixInteger(Integer prefixInteger) {
|
||||
|
||||
this.prefixInteger = prefixInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -525,7 +515,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixBoolean(Boolean prefixBoolean) {
|
||||
|
||||
this.prefixBoolean = prefixBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -550,7 +539,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixArray(List<Integer> prefixArray) {
|
||||
|
||||
this.prefixArray = prefixArray;
|
||||
return this;
|
||||
}
|
||||
@@ -583,7 +571,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) {
|
||||
|
||||
this.prefixWrappedArray = prefixWrappedArray;
|
||||
return this;
|
||||
}
|
||||
@@ -616,7 +603,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceString(String namespaceString) {
|
||||
|
||||
this.namespaceString = namespaceString;
|
||||
return this;
|
||||
}
|
||||
@@ -641,7 +627,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceNumber(BigDecimal namespaceNumber) {
|
||||
|
||||
this.namespaceNumber = namespaceNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -666,7 +651,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceInteger(Integer namespaceInteger) {
|
||||
|
||||
this.namespaceInteger = namespaceInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -691,7 +675,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceBoolean(Boolean namespaceBoolean) {
|
||||
|
||||
this.namespaceBoolean = namespaceBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -716,7 +699,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceArray(List<Integer> namespaceArray) {
|
||||
|
||||
this.namespaceArray = namespaceArray;
|
||||
return this;
|
||||
}
|
||||
@@ -749,7 +731,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) {
|
||||
|
||||
this.namespaceWrappedArray = namespaceWrappedArray;
|
||||
return this;
|
||||
}
|
||||
@@ -782,7 +763,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsString(String prefixNsString) {
|
||||
|
||||
this.prefixNsString = prefixNsString;
|
||||
return this;
|
||||
}
|
||||
@@ -807,7 +787,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) {
|
||||
|
||||
this.prefixNsNumber = prefixNsNumber;
|
||||
return this;
|
||||
}
|
||||
@@ -832,7 +811,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsInteger(Integer prefixNsInteger) {
|
||||
|
||||
this.prefixNsInteger = prefixNsInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -857,7 +835,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) {
|
||||
|
||||
this.prefixNsBoolean = prefixNsBoolean;
|
||||
return this;
|
||||
}
|
||||
@@ -882,7 +859,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsArray(List<Integer> prefixNsArray) {
|
||||
|
||||
this.prefixNsArray = prefixNsArray;
|
||||
return this;
|
||||
}
|
||||
@@ -915,7 +891,6 @@ public class XmlItem {
|
||||
|
||||
|
||||
public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
|
||||
|
||||
this.prefixNsWrappedArray = prefixNsWrappedArray;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||
<parallel>methods</parallel>
|
||||
<threadCount>10</threadCount>
|
||||
<trimStackTrace>false</trimStackTrace>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -56,7 +56,6 @@ import org.openapitools.client.auth.HttpBearerAuth;
|
||||
import org.openapitools.client.auth.HttpSignatureAuth;
|
||||
import org.openapitools.client.auth.ApiKeyAuth;
|
||||
import org.openapitools.client.auth.OAuth;
|
||||
import org.openapitools.client.model.AbstractOpenApiSchema;
|
||||
|
||||
|
||||
public class ApiClient {
|
||||
@@ -890,67 +889,6 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
|
||||
|
||||
Object result = null;
|
||||
int matchCounter = 0;
|
||||
ArrayList<String> matchSchemas = new ArrayList<>();
|
||||
|
||||
if (schema.isNullable()) {
|
||||
response.bufferEntity();
|
||||
if ("{}".equals(String.valueOf(response.readEntity(String.class))) ||
|
||||
"".equals(String.valueOf(response.readEntity(String.class)))) {
|
||||
// schema is nullable and the response body is {} or empty string
|
||||
return schema;
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, GenericType> entry : schema.getSchemas().entrySet()) {
|
||||
String schemaName = entry.getKey();
|
||||
GenericType schemaType = entry.getValue();
|
||||
|
||||
if (schemaType instanceof GenericType) { // model
|
||||
try {
|
||||
Object deserializedObject = deserialize(response, schemaType);
|
||||
if (deserializedObject != null) {
|
||||
result = deserializedObject;
|
||||
matchCounter++;
|
||||
|
||||
if ("anyOf".equals(schema.getSchemaType())) {
|
||||
break;
|
||||
} else if ("oneOf".equals(schema.getSchemaType())) {
|
||||
matchSchemas.add(schemaName);
|
||||
} else {
|
||||
throw new ApiException("Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
|
||||
}
|
||||
} else {
|
||||
// failed to deserialize the response in the schema provided, proceed to the next one if any
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// failed to deserialize, do nothing and try next one (schema)
|
||||
// Logging the error may be useful to troubleshoot why a payload fails to match
|
||||
// the schema.
|
||||
log.log(Level.FINE, "Input data does not match schema '" + schemaName + "'", ex);
|
||||
}
|
||||
} else {// unknown type
|
||||
throw new ApiException(schemaType.getClass() + " is not a GenericType and cannot be handled properly in deserialization.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) {// more than 1 match for oneOf
|
||||
throw new ApiException("Response body is invalid as it matches more than one schema (" + StringUtil.join(matchSchemas, ", ") + ") defined in the oneOf model: " + schema.getClass().getName());
|
||||
} else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas
|
||||
throw new ApiException("Response body is invalid as it does not match any schemas (" + StringUtil.join(schema.getSchemas().keySet(), ", ") + ") defined in the oneOf/anyOf model: " + schema.getClass().getName());
|
||||
} else { // only one matched
|
||||
schema.setActualInstance(result);
|
||||
return schema;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deserialize response body to Java object according to the Content-Type.
|
||||
* @param <T> Type
|
||||
@@ -1052,7 +990,6 @@ 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 schema An instance of the response that uses oneOf/anyOf
|
||||
* @return The response body in type of string
|
||||
* @throws ApiException API exception
|
||||
*/
|
||||
@@ -1068,8 +1005,7 @@ public class ApiClient {
|
||||
String accept,
|
||||
String contentType,
|
||||
String[] authNames,
|
||||
GenericType<T> returnType,
|
||||
AbstractOpenApiSchema schema)
|
||||
GenericType<T> returnType)
|
||||
throws ApiException {
|
||||
|
||||
// Not using `.target(targetURL).path(path)` below,
|
||||
@@ -1166,12 +1102,10 @@ public class ApiClient {
|
||||
if (response.getStatusInfo() == Status.NO_CONTENT) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
|
||||
if (returnType == null) return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
else if (schema == null) {
|
||||
if (returnType == null) {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders);
|
||||
} else {
|
||||
return new ApiResponse<T>(statusCode, responseHeaders, deserialize(response, returnType));
|
||||
} else { // oneOf/anyOf
|
||||
return new ApiResponse<T>(
|
||||
statusCode, responseHeaders, (T) deserializeSchemas(response, schema));
|
||||
}
|
||||
} else {
|
||||
String message = "error";
|
||||
@@ -1217,8 +1151,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, AbstractOpenApiSchema schema) throws ApiException {
|
||||
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, schema);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,9 +4,14 @@ import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import org.openapitools.jackson.nullable.JsonNullableModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.openapitools.client.model.*;
|
||||
|
||||
import java.text.DateFormat;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
import javax.ws.rs.ext.ContextResolver;
|
||||
|
||||
|
||||
@@ -46,4 +51,197 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
||||
* @return object mapper
|
||||
*/
|
||||
public ObjectMapper getMapper() { return mapper; }
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param modelClass The class that contains the discriminator mappings.
|
||||
*/
|
||||
public static Class getClassForElement(JsonNode node, Class modelClass) {
|
||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||
if (cdm != null) {
|
||||
return cdm.getClassForElement(node, new HashSet<Class>());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper class to register the discriminator mappings.
|
||||
*/
|
||||
private static class ClassDiscriminatorMapping {
|
||||
// The model class name.
|
||||
Class modelClass;
|
||||
// The name of the discriminator property.
|
||||
String discriminatorName;
|
||||
// The discriminator mappings for a model class.
|
||||
Map<String, Class> discriminatorMappings;
|
||||
|
||||
// Constructs a new class discriminator.
|
||||
ClassDiscriminatorMapping(Class cls, String propertyName, Map<String, Class> mappings) {
|
||||
modelClass = cls;
|
||||
discriminatorName = propertyName;
|
||||
discriminatorMappings = new HashMap<String, Class>();
|
||||
if (mappings != null) {
|
||||
discriminatorMappings.putAll(mappings);
|
||||
}
|
||||
}
|
||||
|
||||
// Return the name of the discriminator property for this model class.
|
||||
String getDiscriminatorPropertyName() {
|
||||
return discriminatorName;
|
||||
}
|
||||
|
||||
// Return the discriminator value or null if the discriminator is not
|
||||
// present in the payload.
|
||||
String getDiscriminatorValue(JsonNode node) {
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
if (discriminatorName != null) {
|
||||
// Get the value of the discriminator property, if present in the input payload.
|
||||
node = node.get(discriminatorName);
|
||||
if (node != null && node.isValueNode()) {
|
||||
String discrValue = node.asText();
|
||||
if (discrValue != null) {
|
||||
return discrValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the target model class that should be used to deserialize the input data.
|
||||
* This function can be invoked for anyOf/oneOf composed models with discriminator mappings.
|
||||
* The discriminator mappings are used to determine the target model class.
|
||||
*
|
||||
* @param node The input data.
|
||||
* @param visitedClasses The set of classes that have already been visited.
|
||||
*/
|
||||
Class getClassForElement(JsonNode node, Set<Class> visitedClasses) {
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// Class has already been visited.
|
||||
return null;
|
||||
}
|
||||
// Determine the value of the discriminator property in the input data.
|
||||
String discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
return null;
|
||||
}
|
||||
Class cls = discriminatorMappings.get(discrValue);
|
||||
// It may not be sufficient to return this cls directly because that target class
|
||||
// may itself be a composed schema, possibly with its own discriminator.
|
||||
visitedClasses.add(modelClass);
|
||||
for (Class childClass : discriminatorMappings.values()) {
|
||||
ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass);
|
||||
if (childCdm == null) {
|
||||
continue;
|
||||
}
|
||||
if (!discriminatorName.equals(childCdm.discriminatorName)) {
|
||||
discrValue = getDiscriminatorValue(node);
|
||||
if (discrValue == null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (childCdm != null) {
|
||||
// Recursively traverse the discriminator mappings.
|
||||
Class childDiscr = childCdm.getClassForElement(node, visitedClasses);
|
||||
if (childDiscr != null) {
|
||||
return childDiscr;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cls;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy.
|
||||
*
|
||||
* The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy,
|
||||
* so it's not possible to use the instanceof keyword.
|
||||
*
|
||||
* @param modelClass A OpenAPI model class.
|
||||
* @param inst The instance object.
|
||||
*/
|
||||
public static boolean isInstanceOf(Class modelClass, Object inst, Set<Class> visitedClasses) {
|
||||
if (modelClass.isInstance(inst)) {
|
||||
// This handles the 'allOf' use case with single parent inheritance.
|
||||
return true;
|
||||
}
|
||||
if (visitedClasses.contains(modelClass)) {
|
||||
// This is to prevent infinite recursion when the composed schemas have
|
||||
// a circular dependency.
|
||||
return false;
|
||||
}
|
||||
visitedClasses.add(modelClass);
|
||||
|
||||
// Traverse the oneOf/anyOf composed schemas.
|
||||
Map<String, GenericType> descendants = modelDescendants.get(modelClass);
|
||||
if (descendants != null) {
|
||||
for (GenericType childType : descendants.values()) {
|
||||
if (isInstanceOf(childType.getRawType(), inst, visitedClasses)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* A map of discriminators for all model classes.
|
||||
*/
|
||||
private static Map<Class, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class, ClassDiscriminatorMapping>();
|
||||
|
||||
/**
|
||||
* A map of oneOf/anyOf descendants for each model class.
|
||||
*/
|
||||
private static Map<Class, Map<String, GenericType>> modelDescendants = new HashMap<Class, Map<String, GenericType>>();
|
||||
|
||||
/**
|
||||
* Register a model class discriminator.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param discriminatorPropertyName the name of the discriminator property
|
||||
* @param mappings a map with the discriminator mappings.
|
||||
*/
|
||||
public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map<String, Class> mappings) {
|
||||
ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings);
|
||||
modelDiscriminators.put(modelClass, m);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the oneOf/anyOf descendants of the modelClass.
|
||||
*
|
||||
* @param modelClass the model class
|
||||
* @param descendants a map of oneOf/anyOf descendants.
|
||||
*/
|
||||
public static void registerDescendants(Class modelClass, Map<String, GenericType> descendants) {
|
||||
modelDescendants.put(modelClass, descendants);
|
||||
}
|
||||
|
||||
private static JSON json;
|
||||
|
||||
static
|
||||
{
|
||||
json = new JSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the default JSON instance.
|
||||
*
|
||||
* @return the default JSON instance
|
||||
*/
|
||||
public static JSON getDefault() {
|
||||
return json;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default JSON instance.
|
||||
*
|
||||
* @param json JSON instance to be used
|
||||
*/
|
||||
public static void setDefault(JSON json) {
|
||||
JSON.json = json;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,6 @@ public class AnotherFakeApi {
|
||||
|
||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,6 @@ public class DefaultApi {
|
||||
|
||||
return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeHealthGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -174,7 +174,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -236,7 +236,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -298,7 +298,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -360,7 +360,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -484,7 +484,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -556,7 +556,7 @@ public class FakeApi {
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
|
||||
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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
|
||||
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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
@@ -1252,6 +1252,6 @@ if (param2 != null)
|
||||
|
||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +110,6 @@ public class FakeClassnameTags123Api {
|
||||
|
||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, localVarReturnType, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public class PetApi {
|
||||
|
||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class StoreApi {
|
||||
|
||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class UserApi {
|
||||
|
||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
localVarAuthNames, null, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* 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, null);
|
||||
localVarAuthNames, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,14 +41,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
this.isNullable = isNullable;
|
||||
}
|
||||
|
||||
/***
|
||||
* Get the list of schemas allowed to be stored in this object
|
||||
/**
|
||||
* Get the list of oneOf/anyOf composed schemas allowed to be stored in this object
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
*/
|
||||
public abstract Map<String, GenericType> getSchemas();
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the actual instance
|
||||
*
|
||||
* @return an instance of the actual schema/object
|
||||
@@ -56,14 +56,14 @@ public abstract class AbstractOpenApiSchema {
|
||||
@JsonValue
|
||||
public Object getActualInstance() {return instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Set the actual instance
|
||||
*
|
||||
* @param instance the actual instance of the schema/object
|
||||
*/
|
||||
public void setActualInstance(Object instance) {this.instance = instance;}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Get the schema type (e.g. anyOf, oneOf)
|
||||
*
|
||||
* @return the schema type
|
||||
@@ -112,7 +112,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Objects.hash(instance, isNullable, schemaType);
|
||||
}
|
||||
|
||||
/***
|
||||
/**
|
||||
* Is nullalble
|
||||
*
|
||||
* @return true if it's nullable
|
||||
@@ -124,4 +124,7 @@ public abstract class AbstractOpenApiSchema {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -28,6 +30,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.openapitools.jackson.nullable.JsonNullable;
|
||||
import java.util.NoSuchElementException;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
@@ -70,7 +74,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||
|
||||
this.mapProperty = mapProperty;
|
||||
return this;
|
||||
}
|
||||
@@ -103,7 +106,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
|
||||
this.mapOfMapProperty = mapOfMapProperty;
|
||||
return this;
|
||||
}
|
||||
@@ -137,7 +139,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
public AdditionalPropertiesClass anytype1(Object anytype1) {
|
||||
this.anytype1 = JsonNullable.<Object>of(anytype1);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -171,7 +172,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype1(Object mapWithUndeclaredPropertiesAnytype1) {
|
||||
|
||||
this.mapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1;
|
||||
return this;
|
||||
}
|
||||
@@ -196,7 +196,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype2(Object mapWithUndeclaredPropertiesAnytype2) {
|
||||
|
||||
this.mapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2;
|
||||
return this;
|
||||
}
|
||||
@@ -221,7 +220,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapWithUndeclaredPropertiesAnytype3(Map<String, Object> mapWithUndeclaredPropertiesAnytype3) {
|
||||
|
||||
this.mapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3;
|
||||
return this;
|
||||
}
|
||||
@@ -254,7 +252,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass emptyMap(Object emptyMap) {
|
||||
|
||||
this.emptyMap = emptyMap;
|
||||
return this;
|
||||
}
|
||||
@@ -279,7 +276,6 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
|
||||
public AdditionalPropertiesClass mapWithUndeclaredPropertiesString(Map<String, String> mapWithUndeclaredPropertiesString) {
|
||||
|
||||
this.mapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Cat;
|
||||
import org.openapitools.client.model.Dog;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Animal
|
||||
@@ -50,7 +54,6 @@ public class Animal {
|
||||
|
||||
|
||||
public Animal className(String className) {
|
||||
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
@@ -74,7 +77,6 @@ public class Animal {
|
||||
|
||||
|
||||
public Animal color(String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
@@ -138,5 +140,13 @@ public class Animal {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("Cat", Cat.class);
|
||||
mappings.put("Dog", Dog.class);
|
||||
mappings.put("Animal", Animal.class);
|
||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Apple
|
||||
@@ -40,7 +44,6 @@ public class Apple {
|
||||
|
||||
|
||||
public Apple cultivar(String cultivar) {
|
||||
|
||||
this.cultivar = cultivar;
|
||||
return this;
|
||||
}
|
||||
@@ -65,7 +68,6 @@ public class Apple {
|
||||
|
||||
|
||||
public Apple origin(String origin) {
|
||||
|
||||
this.origin = origin;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* AppleReq
|
||||
@@ -40,7 +44,6 @@ public class AppleReq {
|
||||
|
||||
|
||||
public AppleReq cultivar(String cultivar) {
|
||||
|
||||
this.cultivar = cultivar;
|
||||
return this;
|
||||
}
|
||||
@@ -64,7 +67,6 @@ public class AppleReq {
|
||||
|
||||
|
||||
public AppleReq mealy(Boolean mealy) {
|
||||
|
||||
this.mealy = mealy;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
@@ -39,7 +43,6 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
@@ -39,7 +43,6 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
this.arrayNumber = arrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -25,6 +27,8 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.openapitools.client.model.ReadOnlyFirst;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
@@ -47,7 +51,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
this.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
}
|
||||
@@ -80,7 +83,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
|
||||
|
||||
this.arrayArrayOfInteger = arrayArrayOfInteger;
|
||||
return this;
|
||||
}
|
||||
@@ -113,7 +115,6 @@ public class ArrayTest {
|
||||
|
||||
|
||||
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
|
||||
|
||||
this.arrayArrayOfModel = arrayArrayOfModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Banana
|
||||
@@ -37,7 +41,6 @@ public class Banana {
|
||||
|
||||
|
||||
public Banana lengthCm(BigDecimal lengthCm) {
|
||||
|
||||
this.lengthCm = lengthCm;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -23,6 +25,8 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* BananaReq
|
||||
@@ -41,7 +45,6 @@ public class BananaReq {
|
||||
|
||||
|
||||
public BananaReq lengthCm(BigDecimal lengthCm) {
|
||||
|
||||
this.lengthCm = lengthCm;
|
||||
return this;
|
||||
}
|
||||
@@ -65,7 +68,6 @@ public class BananaReq {
|
||||
|
||||
|
||||
public BananaReq sweet(Boolean sweet) {
|
||||
|
||||
this.sweet = sweet;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* BasquePig
|
||||
@@ -36,7 +40,6 @@ public class BasquePig {
|
||||
|
||||
|
||||
public BasquePig className(String className) {
|
||||
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Capitalization
|
||||
@@ -56,7 +60,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
||||
this.smallCamel = smallCamel;
|
||||
return this;
|
||||
}
|
||||
@@ -81,7 +84,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization capitalCamel(String capitalCamel) {
|
||||
|
||||
this.capitalCamel = capitalCamel;
|
||||
return this;
|
||||
}
|
||||
@@ -106,7 +108,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization smallSnake(String smallSnake) {
|
||||
|
||||
this.smallSnake = smallSnake;
|
||||
return this;
|
||||
}
|
||||
@@ -131,7 +132,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization capitalSnake(String capitalSnake) {
|
||||
|
||||
this.capitalSnake = capitalSnake;
|
||||
return this;
|
||||
}
|
||||
@@ -156,7 +156,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
|
||||
|
||||
this.scAETHFlowPoints = scAETHFlowPoints;
|
||||
return this;
|
||||
}
|
||||
@@ -181,7 +180,6 @@ public class Capitalization {
|
||||
|
||||
|
||||
public Capitalization ATT_NAME(String ATT_NAME) {
|
||||
|
||||
this.ATT_NAME = ATT_NAME;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Animal;
|
||||
import org.openapitools.client.model.CatAllOf;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Cat
|
||||
@@ -44,7 +48,6 @@ public class Cat extends Animal {
|
||||
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
@@ -108,5 +111,11 @@ public class Cat extends Animal {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("Cat", Cat.class);
|
||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* CatAllOf
|
||||
@@ -36,7 +40,6 @@ public class CatAllOf {
|
||||
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Category
|
||||
@@ -40,7 +44,6 @@ public class Category {
|
||||
|
||||
|
||||
public Category id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
@@ -65,7 +68,6 @@ public class Category {
|
||||
|
||||
|
||||
public Category name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -26,6 +28,8 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.ChildCatAllOf;
|
||||
import org.openapitools.client.model.ParentPet;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ChildCat
|
||||
@@ -44,7 +48,6 @@ public class ChildCat extends ParentPet {
|
||||
|
||||
|
||||
public ChildCat name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
@@ -108,5 +111,11 @@ public class ChildCat extends ParentPet {
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
static {
|
||||
// Initialize and register the discriminator mappings.
|
||||
Map<String, Class> mappings = new HashMap<String, Class>();
|
||||
mappings.put("ChildCat", ChildCat.class);
|
||||
JSON.registerDiscriminator(ChildCat.class, "pet_type", mappings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* ChildCatAllOf
|
||||
@@ -36,7 +40,6 @@ public class ChildCatAllOf {
|
||||
|
||||
|
||||
public ChildCatAllOf name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Model for testing model with \"_class\" property
|
||||
@@ -37,7 +41,6 @@ public class ClassModel {
|
||||
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@@ -22,6 +24,8 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* Client
|
||||
@@ -36,7 +40,6 @@ public class Client {
|
||||
|
||||
|
||||
public Client client(String client) {
|
||||
|
||||
this.client = client;
|
||||
return this;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user