Skip to content

Commit db85d66

Browse files
committed
better null check when normalizing schema
1 parent 763af9e commit db85d66

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
@@ -696,7 +696,7 @@ protected boolean isSelfReference(String name, Schema subSchema) {
696696
*/
697697
public Schema normalizeSchema(Schema schema, Set<Schema> visitedSchemas) {
698698
// normalize reference schema
699-
if (StringUtils.isNotEmpty(schema.get$ref())) {
699+
if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) {
700700
normalizeReferenceSchema(schema);
701701
}
702702

0 commit comments

Comments
 (0)