diff --git a/src/middlewares/parsers/schema.preprocessor.ts b/src/middlewares/parsers/schema.preprocessor.ts index 0ce96c5b..e0f4a11b 100644 --- a/src/middlewares/parsers/schema.preprocessor.ts +++ b/src/middlewares/parsers/schema.preprocessor.ts @@ -171,6 +171,12 @@ export class SchemaPreprocessor { const recurse = (parent, node, opts: TraversalStates) => { const schema = this.resolveSchema(node.schema); + if (!schema) { + // if we can't resolve the schema, skip it + // TODO fix me - must resolve $refs like, etc + // #/paths/~1subscription/get/requestBody/content/application~1json/schema/properties/subscription + return; + } // Save the original schema so we can check if it was a $ref (opts).req.originalSchema = node.schema; (opts).res.originalSchema = node.schema;