You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Since 5.2.0 I'm getting an error with the express-openapi-validator. With the previous 5.1.6 everything was finde. After some digging I could narrow it down to the json-schema-ref-parser.
While the initial loading is fine the validator throws exceptions on any endpoint call. The stack looks like:
ReferenceError: location is not defined
at Object.cwd (/app/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/util/url.js:71:9)
at $RefParser.parse (/app/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js:101:37)
at $RefParser.resolve (/app/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js:145:24)
at $RefParser.bundle (/app/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js:165:24)
at Object.bundle (/app/node_modules/@apidevtools/json-schema-ref-parser/dist/lib/index.js:160:32)
at OpenAPIFramework.loadSpec (/app/node_modules/express-openapi-validator/dist/framework/index.js:62:34)
at OpenAPIFramework.initialize (/app/node_modules/express-openapi-validator/dist/framework/index.js:16:35)
at OpenApiSpecLoader.discoverRoutes (/app/node_modules/express-openapi-validator/dist/framework/openapi.spec.loader.js:29:60)
at OpenApiSpecLoader.load (/app/node_modules/express-openapi-validator/dist/framework/openapi.spec.loader.js:21:21)
at Module.openapiValidator (/app/node_modules/express-openapi-validator/dist/index.js:31:8)
To Reproduce
I'll try to setup a repo for testing.
Actual behavior
Starting up the server is fine but as soon as you call a route the exception is thrown.
Expected behavior
The bug is only in 5.2.0 and going back to 5.1.6 resolves the issue.
Examples and context
This is how I load the openapi.yaml file in
Describe the bug
Since 5.2.0 I'm getting an error with the express-openapi-validator. With the previous 5.1.6 everything was finde. After some digging I could narrow it down to the json-schema-ref-parser.
While the initial loading is fine the validator throws exceptions on any endpoint call. The stack looks like:
To Reproduce
I'll try to setup a repo for testing.
Actual behavior
Starting up the server is fine but as soon as you call a route the exception is thrown.
Expected behavior
The bug is only in 5.2.0 and going back to 5.1.6 resolves the issue.
Examples and context
This is how I load the openapi.yaml file in
The text was updated successfully, but these errors were encountered: