diff --git a/lib/validators/schema.js b/lib/validators/schema.js index 7c297dca..230dad25 100644 --- a/lib/validators/schema.js +++ b/lib/validators/schema.js @@ -41,7 +41,7 @@ function validateSchema(api, options) { schema = openapi.v2; ajv = initializeAjv(); } else if (api.openapi.startsWith('3.1')) { - schema = openapi.v31; + schema = openapi.v31legacy; // There's a bug with Ajv in how it handles `$dynamicRef` in the way that it's used within the 3.1 schema so we // need to do some adhoc workarounds.