Unsupported OpenAPI version: 3.1.0
Issue #32
new
openapi-diff fails with OAS files set with version 3.1.0
OpenApiDiffErrorImpl [VError]: Validation errors in "oas.json": Unsupported OpenAPI version: 3.1.0. Swagger Parser only supports versions 3.0.0, 3.0.1, 3.0.2, 3.0.3
at .nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/dist/openapi-diff/spec-parser/common/validate-and-dereference-spec.js:23:15
at Generator.throw (<anonymous>)
at rejected (.nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/dist/openapi-diff/spec-parser/common/validate-and-dereference-spec.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
jse_shortmsg: 'Validation errors in "oas.json"',
jse_cause: {
stack: 'SyntaxError: Unsupported OpenAPI version: 3.1.0. Swagger Parser only supports versions 3.0.0, 3.0.1, 3.0.2, 3.0.3\n' +
' at SwaggerParser.parse (.nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/node_modules/@apidevtools/swagger-parser/lib/index.js:95:19)\n' +
' at processTicksAndRejections (internal/process/task_queues.js:93:5)\n' +
' at async SwaggerParser.resolve (.nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/node_modules/@apidevtools/json-schema-ref-parser/lib/index.js:184:5)\n' +
' at async SwaggerParser.dereference (.nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/node_modules/@apidevtools/json-schema-ref-parser/lib/index.js:268:5)\n' +
' at async SwaggerParser.validate (.nvm/versions/node/v14.16.1/lib/node_modules/openapi-diff/node_modules/@apidevtools/swagger-parser/lib/index.js:147:5)',
message: 'Unsupported OpenAPI version: 3.1.0. Swagger Parser only supports versions 3.0.0, 3.0.1, 3.0.2, 3.0.3',
toJSON: [Function: toJSON],
name: 'SyntaxError',
toString: [Function: toString]
},
jse_info: {},
code: 'OPENAPI_DIFF_PARSE_ERROR'
}
OAS 3.1.0 has been released a year ago, so it should be supported.