Skip to content

Commit 81e4e60

Browse files
committed
add back null check
1 parent 443ff4f commit 81e4e60

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
@@ -722,7 +722,7 @@ protected boolean isSelfReference(String name, Schema subSchema) {
722722
*/
723723
public Schema normalizeSchema(Schema schema, Set<Schema> visitedSchemas) {
724724
// normalize reference schema
725-
if (StringUtils.isNotEmpty(schema.get$ref())) {
725+
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
726726
normalizeReferenceSchema(schema);
727727
}
728728

0 commit comments

Comments
 (0)