We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe43877 commit 3a1fb21Copy full SHA for 3a1fb21
lib/open-api-mocker.js
@@ -1,6 +1,6 @@
1
'use strict';
2
3
-const jsonRefs = require('json-refs');
+const SwaggerParser = require('@apidevtools/swagger-parser');
4
5
const { Parser: OpenApiParser } = require('./openapi');
6
const { Parser: ServersParser } = require('./servers');
@@ -41,9 +41,7 @@ class OpenApiMocker {
41
this.schema = await this.schema;
42
43
try {
44
- const parsedSchemas = await jsonRefs.resolveRefs(this.schema);
45
-
46
- this.schema = parsedSchemas.resolved;
+ this.schema = await SwaggerParser.validate(this.schema);
47
48
const openApiParser = new OpenApiParser();
49
const openapi = openApiParser.parse(this.schema);
0 commit comments