Skip to content

Commit

Permalink
refs #4645 - fix NPE in header resolving with no components
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Apr 9, 2024
1 parent d5c3728 commit 95c8253
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,10 @@ public static Optional<Header> getHeader(io.swagger.v3.oas.annotations.headers.H
if (resolvedSchema.schema != null) {
headerObject.setSchema(resolvedSchema.schema);
}
resolvedSchema.referencedSchemas.forEach(components::addSchemas);
if (resolvedSchema.referencedSchemas != null && components != null) {
resolvedSchema.referencedSchemas.forEach(components::addSchemas);
}

}
}
if (hasArrayAnnotation(header.array())){
Expand Down

0 comments on commit 95c8253

Please sign in to comment.