From 101da6e43446cd13b078b0b56465a19f980cb9e2 Mon Sep 17 00:00:00 2001
From: Justin Black
Date: Sun, 7 Mar 2021 09:42:47 -0800
Subject: [PATCH] Adds getAdditionalPropertiesIsAnyType to java schema classes
(#8908)
* Adds getter and setter for AdditionalPropertiesIsAnyType in IJsonSchemaValidationProperties
* Removes venv
* Implements getter and setter in CodegenModel
* Implements getter and setter in CodegenProperty
* Implements getter and setter in CodegenParameter
* Adds getter and setter in CodegenResponse
* Creates setAddProps
* Removes comment
* Adds setAdditionalPropertiesIsAnyType invocations
* Updates samples
* Updates tests in testAdditionalPropertiesPresentInResponses
* Updates tests in testAdditionalPropertiesPresentInParameters
* Updates testAdditionalPropertiesPresentInModelProperties to check getAdditionalPropertiesIsAnyType
* Updates testAdditionalPropertiesPresentInModels
---
.../openapitools/codegen/CodegenModel.java | 16 +++-
.../codegen/CodegenParameter.java | 16 +++-
.../openapitools/codegen/CodegenProperty.java | 15 ++-
.../openapitools/codegen/CodegenResponse.java | 15 ++-
.../openapitools/codegen/DefaultCodegen.java | 88 +++++++++---------
.../IJsonSchemaValidationProperties.java | 6 +-
.../codegen/DefaultCodegenTest.java | 28 ++++++
.../petstore/python-experimental/.coverage | Bin 0 -> 94208 bytes
.../handler/PathHandlerInterface.java | 4 +-
9 files changed, 137 insertions(+), 51 deletions(-)
create mode 100644 samples/openapi3/client/petstore/python-experimental/.coverage
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 1663343387f..5bb6cbda4b7 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -65,6 +65,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public String arrayModelType;
public boolean isAlias; // Is this effectively an alias of another simple type
public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime;
+ private boolean additionalPropertiesIsAnyType;
public List vars = new ArrayList(); // all properties (without parent's properties)
public List allVars = new ArrayList(); // all properties (with parent's properties)
public List requiredVars = new ArrayList(); // a list of required properties
@@ -712,6 +713,16 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
this.isNull = isNull;
}
+ @Override
+ public boolean getAdditionalPropertiesIsAnyType() {
+ return additionalPropertiesIsAnyType;
+ }
+
+ @Override
+ public void setAdditionalPropertiesIsAnyType(boolean additionalPropertiesIsAnyType) {
+ this.additionalPropertiesIsAnyType = additionalPropertiesIsAnyType;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
@@ -742,6 +753,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
hasOnlyReadOnly == that.hasOnlyReadOnly &&
isNull == that.isNull &&
hasValidation == that.hasValidation &&
+ getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
getUniqueItems() == that.getUniqueItems() &&
getExclusiveMinimum() == that.getExclusiveMinimum() &&
getExclusiveMaximum() == that.getExclusiveMaximum() &&
@@ -813,7 +825,8 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), getVendorExtensions(),
getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(),
getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(),
- getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel());
+ getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
+ getAdditionalPropertiesIsAnyType());
}
@Override
@@ -899,6 +912,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
sb.append(", isModel='").append(isModel).append('\'');
sb.append(", isNull='").append(isNull);
sb.append(", hasValidation='").append(hasValidation);
+ sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
sb.append('}');
return sb.toString();
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
index 6cbaec8b747..3ecbc32462f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java
@@ -39,6 +39,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
public boolean isArray, isMap;
public boolean isFile;
public boolean isEnum;
+ private boolean additionalPropertiesIsAnyType;
public List _enum;
public Map allowableValues;
public CodegenProperty items;
@@ -149,6 +150,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
output.pattern = this.pattern;
output.additionalProperties = this.additionalProperties;
output.isNull = this.isNull;
+ output.setAdditionalPropertiesIsAnyType(this.getAdditionalPropertiesIsAnyType());
if (this._enum != null) {
output._enum = new ArrayList(this._enum);
@@ -203,7 +205,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override
public int hashCode() {
- return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull);
+ return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumName, style, isDeepObject, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, getAdditionalPropertiesIsAnyType());
}
@Override
@@ -248,6 +250,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
isNullable == that.isNullable &&
required == that.required &&
isNull == that.isNull &&
+ getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
getExclusiveMaximum() == that.getExclusiveMaximum() &&
getExclusiveMinimum() == that.getExclusiveMinimum() &&
getUniqueItems() == that.getUniqueItems() &&
@@ -364,6 +367,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
sb.append(", contentType=").append(contentType);
sb.append(", multipleOf=").append(multipleOf);
sb.append(", isNull=").append(isNull);
+ sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
sb.append('}');
return sb.toString();
}
@@ -591,5 +595,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
@Override
public void setHasValidation(boolean hasValidation) { this.hasValidation = hasValidation; }
+
+ @Override
+ public boolean getAdditionalPropertiesIsAnyType() {
+ return additionalPropertiesIsAnyType;
+ }
+
+ @Override
+ public void setAdditionalPropertiesIsAnyType(boolean additionalPropertiesIsAnyType) {
+ this.additionalPropertiesIsAnyType = additionalPropertiesIsAnyType;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
index 60d32f47712..d4dadd49fc2 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java
@@ -185,6 +185,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
public String xmlName;
public String xmlNamespace;
public boolean isXmlWrapped = false;
+ private boolean additionalPropertiesIsAnyType;
public String getBaseName() {
return baseName;
@@ -693,6 +694,16 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
@Override
public void setHasValidation(boolean hasValidation) { this.hasValidation = hasValidation; }
+ @Override
+ public boolean getAdditionalPropertiesIsAnyType() {
+ return additionalPropertiesIsAnyType;
+ }
+
+ @Override
+ public void setAdditionalPropertiesIsAnyType(boolean additionalPropertiesIsAnyType) {
+ this.additionalPropertiesIsAnyType = additionalPropertiesIsAnyType;
+ }
+
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("CodegenProperty{");
@@ -782,6 +793,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
sb.append(", xmlNamespace='").append(xmlNamespace).append('\'');
sb.append(", isXmlWrapped=").append(isXmlWrapped);
sb.append(", isNull=").append(isNull);
+ sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
sb.append('}');
return sb.toString();
}
@@ -831,6 +843,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
isXmlAttribute == that.isXmlAttribute &&
isXmlWrapped == that.isXmlWrapped &&
isNull == that.isNull &&
+ getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
Objects.equals(openApiType, that.openApiType) &&
Objects.equals(baseName, that.baseName) &&
Objects.equals(complexType, that.complexType) &&
@@ -892,6 +905,6 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti
items, mostInnerItems, additionalProperties, vars, requiredVars,
vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase,
nameInSnakeCase, enumName, maxItems, minItems, isXmlAttribute, xmlPrefix, xmlName,
- xmlNamespace, isXmlWrapped, isNull);
+ xmlNamespace, isXmlWrapped, isNull, getAdditionalPropertiesIsAnyType());
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
index 5db6b721715..856bb8fc292 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenResponse.java
@@ -79,6 +79,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
public List vars = new ArrayList(); // all properties (without parent's properties)
public List requiredVars = new ArrayList();
private boolean hasValidation;
+ private boolean additionalPropertiesIsAnyType;
@Override
public int hashCode() {
@@ -89,7 +90,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
vars, requiredVars, isNull, hasValidation,
getMaxProperties(), getMinProperties(), uniqueItems, getMaxItems(), getMinItems(), getMaxLength(),
getMinLength(), exclusiveMinimum, exclusiveMaximum, getMinimum(), getMaximum(), getPattern(),
- is1xx, is2xx, is3xx, is4xx, is5xx);
+ is1xx, is2xx, is3xx, is4xx, is5xx, getAdditionalPropertiesIsAnyType());
}
@Override
@@ -131,6 +132,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
is3xx == that.is3xx &&
is4xx == that.is4xx &&
is5xx == that.is5xx &&
+ getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() &&
Objects.equals(vars, that.vars) &&
Objects.equals(requiredVars, that.requiredVars) &&
Objects.equals(headers, that.headers) &&
@@ -429,6 +431,7 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
sb.append(", requiredVars='").append(requiredVars).append('\'');
sb.append(", isNull='").append(isNull);
sb.append(", hasValidation='").append(hasValidation);
+ sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType());
sb.append('}');
return sb.toString();
}
@@ -465,4 +468,14 @@ public class CodegenResponse implements IJsonSchemaValidationProperties {
@Override
public void setHasValidation(boolean hasValidation) { this.hasValidation = hasValidation; }
+
+ @Override
+ public boolean getAdditionalPropertiesIsAnyType() {
+ return additionalPropertiesIsAnyType;
+ }
+
+ @Override
+ public void setAdditionalPropertiesIsAnyType(boolean additionalPropertiesIsAnyType) {
+ this.additionalPropertiesIsAnyType = additionalPropertiesIsAnyType;
+ }
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index c5641cde3d6..e2c86e22beb 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -2579,27 +2579,7 @@ public class DefaultCodegen implements CodegenConfig {
}
// process 'additionalProperties'
- if (schema.getAdditionalProperties() == null) {
- if (disallowAdditionalPropertiesIfNotPresent) {
- m.isAdditionalPropertiesTrue = false;
- } else {
- m.isAdditionalPropertiesTrue = true;
- CodegenProperty cp = fromProperty("", new Schema());
- m.setAdditionalProperties(cp);
- }
- } else if (schema.getAdditionalProperties() instanceof Boolean) {
- if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
- m.isAdditionalPropertiesTrue = true;
- CodegenProperty cp = fromProperty("", new Schema());
- m.setAdditionalProperties(cp);
- } else {
- m.isAdditionalPropertiesTrue = false;
- }
- } else {
- m.isAdditionalPropertiesTrue = false;
- CodegenProperty cp = fromProperty("", (Schema) schema.getAdditionalProperties());
- m.setAdditionalProperties(cp);
- }
+ setAddProps(schema, m);
// post process model properties
if (m.vars != null) {
@@ -2616,15 +2596,48 @@ public class DefaultCodegen implements CodegenConfig {
return m;
}
- /**
- * Recursively look in Schema sc for the discriminator discPropName
- * and return a CodegenProperty with the dataType and required params set
- * the returned CodegenProperty may not be required and it may not be of type string
- *
- * @param composedSchemaName The name of the sc Schema
- * @param sc The Schema that may contain the discriminator
- * @param discPropName The String that is the discriminator propertyName in the schema
- */
+ private void setAddProps(Schema schema, IJsonSchemaValidationProperties property){
+ CodegenModel m = null;
+ if (property instanceof CodegenModel) {
+ m = (CodegenModel) property;
+ }
+ boolean isAdditionalPropertiesTrue = false;
+ if (schema.getAdditionalProperties() == null) {
+ if (!disallowAdditionalPropertiesIfNotPresent) {
+ isAdditionalPropertiesTrue = true;
+ CodegenProperty cp = fromProperty("", new Schema());
+ property.setAdditionalProperties(cp);
+ property.setAdditionalPropertiesIsAnyType(true);
+ }
+ } else if (schema.getAdditionalProperties() instanceof Boolean) {
+ if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
+ isAdditionalPropertiesTrue = true;
+ CodegenProperty cp = fromProperty("", new Schema());
+ property.setAdditionalProperties(cp);
+ property.setAdditionalPropertiesIsAnyType(true);
+ }
+ } else {
+ CodegenProperty cp = fromProperty("", (Schema) schema.getAdditionalProperties());
+ property.setAdditionalProperties(cp);
+ if (isAnyTypeSchema((Schema) schema.getAdditionalProperties())) {
+ property.setAdditionalPropertiesIsAnyType(true);
+ }
+ }
+ if (m != null && isAdditionalPropertiesTrue) {
+ m.isAdditionalPropertiesTrue = true;
+ }
+ }
+
+
+ /**
+ * Recursively look in Schema sc for the discriminator discPropName
+ * and return a CodegenProperty with the dataType and required params set
+ * the returned CodegenProperty may not be required and it may not be of type string
+ *
+ * @param composedSchemaName The name of the sc Schema
+ * @param sc The Schema that may contain the discriminator
+ * @param discPropName The String that is the discriminator propertyName in the schema
+ */
private CodegenProperty discriminatorFound(String composedSchemaName, Schema sc, String discPropName, OpenAPI openAPI) {
Schema refSchema = ModelUtils.getReferencedSchema(openAPI, sc);
if (refSchema.getProperties() != null && refSchema.getProperties().get(discPropName) != null) {
@@ -6134,20 +6147,7 @@ public class DefaultCodegen implements CodegenConfig {
.filter(p -> Boolean.TRUE.equals(p.required)).collect(Collectors.toList());
property.setRequiredVars(requireCpVars);
}
- if (schema.getAdditionalProperties() == null) {
- if (!disallowAdditionalPropertiesIfNotPresent) {
- CodegenProperty cp = fromProperty("", new Schema());
- property.setAdditionalProperties(cp);
- }
- } else if (schema.getAdditionalProperties() instanceof Boolean) {
- if (Boolean.TRUE.equals(schema.getAdditionalProperties())) {
- CodegenProperty cp = fromProperty("", new Schema());
- property.setAdditionalProperties(cp);
- }
- } else {
- CodegenProperty cp = fromProperty("", (Schema) schema.getAdditionalProperties());
- property.setAdditionalProperties(cp);
- }
+ setAddProps(schema, property);
}
private void addJsonSchemaForBodyRequestInCaseItsNotPresent(CodegenParameter codegenParameter, RequestBody body) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
index 3d9cd65af29..0dc63f0c1eb 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/IJsonSchemaValidationProperties.java
@@ -98,4 +98,8 @@ public interface IJsonSchemaValidationProperties {
boolean getHasValidation();
void setHasValidation(boolean hasValidation);
-}
+
+ boolean getAdditionalPropertiesIsAnyType();
+
+ void setAdditionalPropertiesIsAnyType(boolean additionalPropertiesIsAnyType);
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
index c0c39e49f11..c673d995f46 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
@@ -2365,22 +2365,26 @@ public class DefaultCodegenTest {
sc = openAPI.getComponents().getSchemas().get(modelName);
cm = codegen.fromModel(modelName, sc);
assertEquals(cm.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(cm.getAdditionalPropertiesIsAnyType(), true);
modelName = "AdditionalPropertiesTrue";
sc = openAPI.getComponents().getSchemas().get(modelName);
cm = codegen.fromModel(modelName, sc);
assertEquals(cm.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(cm.getAdditionalPropertiesIsAnyType(), true);
modelName = "AdditionalPropertiesFalse";
sc = openAPI.getComponents().getSchemas().get(modelName);
cm = codegen.fromModel(modelName, sc);
assertEquals(cm.getAdditionalProperties(), null);
+ assertEquals(cm.getAdditionalPropertiesIsAnyType(), false);
modelName = "AdditionalPropertiesSchema";
sc = openAPI.getComponents().getSchemas().get(modelName);
cm = codegen.fromModel(modelName, sc);
CodegenProperty stringCp = codegen.fromProperty("", new Schema().type("string"));
assertEquals(cm.getAdditionalProperties(), stringCp);
+ assertEquals(cm.getAdditionalPropertiesIsAnyType(), false);
}
@Test
@@ -2411,24 +2415,32 @@ public class DefaultCodegenTest {
cm = codegen.fromModel(modelName, sc);
mapWithAddPropsUnset = cm.getVars().get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = cm.getVars().get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = cm.getVars().get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = cm.getVars().get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
modelName = "ObjectModelWithAddPropsInProps";
sc = openAPI.getComponents().getSchemas().get(modelName);
cm = codegen.fromModel(modelName, sc);
mapWithAddPropsUnset = cm.getVars().get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = cm.getVars().get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = cm.getVars().get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = cm.getVars().get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
if (isGenerateAliasAsModel) { // restore the setting
GlobalSettings.setProperty("generateAliasAsModel", "true");
@@ -2464,24 +2476,32 @@ public class DefaultCodegenTest {
co = codegen.fromOperation(path, "POST", operation, null);
mapWithAddPropsUnset = co.queryParams.get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = co.queryParams.get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = co.queryParams.get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = co.queryParams.get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
path = "/additional_properties/";
operation = openAPI.getPaths().get(path).getPost();
co = codegen.fromOperation(path, "POST", operation, null);
mapWithAddPropsUnset = co.queryParams.get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = co.queryParams.get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = co.queryParams.get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = co.queryParams.get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
if (isGenerateAliasAsModel) { // restore the setting
GlobalSettings.setProperty("generateAliasAsModel", "true");
@@ -2517,24 +2537,32 @@ public class DefaultCodegenTest {
co = codegen.fromOperation(path, "POST", operation, null);
mapWithAddPropsUnset = co.responses.get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = co.responses.get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = co.responses.get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = co.responses.get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
path = "/additional_properties/";
operation = openAPI.getPaths().get(path).getPost();
co = codegen.fromOperation(path, "POST", operation, null);
mapWithAddPropsUnset = co.responses.get(0);
assertEquals(mapWithAddPropsUnset.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsUnset.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsTrue = co.responses.get(1);
assertEquals(mapWithAddPropsTrue.getAdditionalProperties(), anyTypeSchema);
+ assertEquals(mapWithAddPropsTrue.getAdditionalPropertiesIsAnyType(), true);
mapWithAddPropsFalse = co.responses.get(2);
assertEquals(mapWithAddPropsFalse.getAdditionalProperties(), null);
+ assertEquals(mapWithAddPropsFalse.getAdditionalPropertiesIsAnyType(), false);
mapWithAddPropsSchema = co.responses.get(3);
assertEquals(mapWithAddPropsSchema.getAdditionalProperties(), stringCp);
+ assertEquals(mapWithAddPropsSchema.getAdditionalPropertiesIsAnyType(), false);
if (isGenerateAliasAsModel) { // restore the setting
GlobalSettings.setProperty("generateAliasAsModel", "true");
diff --git a/samples/openapi3/client/petstore/python-experimental/.coverage b/samples/openapi3/client/petstore/python-experimental/.coverage
new file mode 100644
index 0000000000000000000000000000000000000000..5955fbda978e38e521f3d0dca42218088d7229ff
GIT binary patch
literal 94208
zcmeHw349yXx$lfL+Gp_+$7^C`b)3YJ9cSO{BxK(gCn1|WmPfW?ZPDU5p^ZJFZJ^Lw
zxV%zmO9}V#N*~a&y_RxQ5_3y|2HLc=O-l*Hx6r0QOTyNKm&Nb<&PcN4*gSZ@&=Yz`
ziN8~*#&
zdnb|r$zO{p9Wl)TZld^Ff*8U%E_r#SGopBvh!XTDQ4Pg7Uvs6s^7>A@r7%CAJ)n?h
zk|Q4Y@5p)@aOiuKWnQ?EClqN$^i2^t=xJ4=6Plz!LE&kk`Mc_<7R-k?0ep<=uA03I
zkz15WNnfp4pq-E)>D1WFg^S7uOFHQ!;I2u3wX4NuOJQj#o3N2&l#H#UvScNpR7?&~
zjHbK-iX4qcQU%FJ6_Tkd`bx=E9!dJZ<5XG9h4V`Xdz@rAcTMt(Rkd)I!h!-;)p7)u
zOZaEXdI)ss%L4r>f{zbBEXP`%mt#j~0A67-7tSsi3^+n?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nERGqBaQGL>mPeZ)>EyL@{gd&rP>A?Me;)?WCNi2Os>~p_Xxp+4LINNo1sM
zy?p=Ae99HZ07H}8DM#htTaxN={@-Cc!ANc5QL#pNKydOm@doJgziV#=XZ@oypfjK|
zpfjK|pfjK|pfm6pVnDTZz;qO~6EC8fFS}MPdjJcib)4BqOznV##=0AAFmRvJ6v5Xy
ztEM$c>do@;%qqouZX`M&i~tJKV%(g`MSkmpJLu;de`=#$!nWv{qAR|^3$Q}4CoB#
z3|tiq(A@`@)%@+CJiU=>{EH9ytB%W8E-DevJ-fr4gLgz^lb*6Q4?8n}eM%#TY*)TZ68zGZ%e
zT%v{=9k4f)oQZgOM0x-VSug3kl1~cmqYbG{%^+r1@e*yResponse headers: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"type" : "integer",
"format" : "int32"
-}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when toekn expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when toekn expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
+}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when toekn expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when toekn expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{
"type" : "string",
"format" : "date-time"
-}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false}]
+}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isLong=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false}]
*
* Produces: [{mediaType=application/xml}, {mediaType=application/json}]
* Returns: {@link String}