Skip to content

Commit 6fca1ef

Browse files
committed
[#19439] Don't assume schema is null type if ref is not null in OpenAPINormalizer#isNullTypeSchema
1 parent d1948aa commit 6fca1ef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ public boolean isNullTypeSchema(Schema schema) {
912912
}
913913

914914
if (schema instanceof JsonSchema) { // 3.1 spec
915-
if (Boolean.TRUE.equals(schema.getNullable())) {
915+
if (Boolean.TRUE.equals(schema.getNullable()) && schema.get$ref() == null) {
916916
return true;
917917
}
918918

0 commit comments

Comments
 (0)