From 2910b00d1d30410e027d0d6631ad4f79b205d257 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 3 Jun 2021 14:11:32 -0700 Subject: [PATCH] Adds hasDiscriminatorWithNonEmptyMapping to CodegenModel --- .../org/openapitools/codegen/CodegenModel.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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 a441659434a8..519e9de8553a 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 @@ -80,7 +80,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties { public Set allMandatory = new TreeSet(); // with parent's required properties public Set imports = new TreeSet(); - public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasValidation; + public boolean hasVars, emptyVars, hasMoreModels, hasEnums, isEnum, hasValidation, hasDiscriminatorWithNonEmptyMapping; /** * Indicates the OAS schema specifies "nullable: true". */ @@ -768,6 +768,14 @@ public void setHasRequired(boolean hasRequired) { this.hasRequired = hasRequired; } + @Override + public boolean getHasDiscriminatorWithNonEmptyMapping() { return hasDiscriminatorWithNonEmptyMapping; }; + + @Override + public void setHasDiscriminatorWithNonEmptyMapping(boolean hasDiscriminatorWithNonEmptyMapping) { + this.hasDiscriminatorWithNonEmptyMapping = hasDiscriminatorWithNonEmptyMapping; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -801,6 +809,7 @@ public boolean equals(Object o) { hasOnlyReadOnly == that.hasOnlyReadOnly && isNull == that.isNull && hasValidation == that.hasValidation && + hasDiscriminatorWithNonEmptyMapping == that.hasDiscriminatorWithNonEmptyMapping && getAdditionalPropertiesIsAnyType() == that.getAdditionalPropertiesIsAnyType() && getUniqueItems() == that.getUniqueItems() && getExclusiveMinimum() == that.getExclusiveMinimum() && @@ -874,7 +883,7 @@ hasChildren, isMap, isDeprecated, hasOnlyReadOnly, getExternalDocumentation(), g getAdditionalPropertiesType(), getMaxProperties(), getMinProperties(), getUniqueItems(), getMaxItems(), getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(), getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(), - getAdditionalPropertiesIsAnyType()); + getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping); } @Override @@ -964,6 +973,7 @@ public String toString() { sb.append(", isNull='").append(isNull); sb.append(", hasValidation='").append(hasValidation); sb.append(", getAdditionalPropertiesIsAnyType=").append(getAdditionalPropertiesIsAnyType()); + sb.append(", hasDiscriminatorWithNonEmptyMapping=").append(hasDiscriminatorWithNonEmptyMapping); sb.append('}'); return sb.toString(); }