Skip to content

Commit 60cf734

Browse files
committed
Revert "Apply suggestion from @Copilot"
This reverts commit c899e9e.
1 parent c899e9e commit 60cf734

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,10 @@ protected void normalizeProperties(Map<String, Schema> properties, Set<Schema> v
864864
isInternal = (Boolean) xInternalValue;
865865
} else if (xInternalValue instanceof String) {
866866
isInternal = Boolean.parseBoolean((String) xInternalValue);
867-
if (property.getExtensions() != null && getRule(REMOVE_X_INTERNAL)
868-
&& Boolean.parseBoolean(String.valueOf(property.getExtensions().get(X_INTERNAL)))) {
869-
property.getExtensions().remove(X_INTERNAL);
867+
}
868+
if (isInternal) {
869+
property.getExtensions().remove(X_INTERNAL);
870+
}
870871
}
871872
Schema newProperty = normalizeSchema(property, new HashSet<>());
872873
propertiesEntry.setValue(newProperty);

0 commit comments

Comments
 (0)