guard against nullable allOf

This commit is contained in:
brunomartinspro 2022-09-27 14:06:28 +01:00
parent 168189b2fd
commit 68f2fa2827

View File

@ -177,7 +177,7 @@ export class OpenAPIParser {
schema = this.hoistOneOfs(schema, refsStack);
if (schema.allOf === undefined) {
if (schema.allOf === null || schema.allOf === undefined) {
return schema;
}
@ -358,7 +358,7 @@ export class OpenAPIParser {
}
private hoistOneOfs(schema: OpenAPISchema, refsStack: string[]) {
if (schema.allOf === undefined) {
if (schema.allOf === null || schema.allOf === undefined) {
return schema;
}