Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to openAPI 3.1.* #169

Closed
TheRealAstoo opened this issue May 17, 2021 · 13 comments
Closed

Add support to openAPI 3.1.* #169

TheRealAstoo opened this issue May 17, 2021 · 13 comments

Comments

@TheRealAstoo
Copy link

Hi,

Is it possible to add support for openAPI 3.1.0 and more?

I get this error when I try to use it with the 3.1.0 version:

Unsupported OpenAPI version: 3.1.0. Swagger Parser only supports versions 3.0.0, 3.0.1, 3.0.2, 3.0.3

Thank you 😃

@philsturgeon
Copy link
Member

Let's make sure we support type: null properly, as was brought up in #138.

@mrehanabbasi
Copy link

Any update on this? I'd really like this.

@philsturgeon
Copy link
Member

Release process is gnarled up from various Node changes and I dont have time to invest in fixing it.

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/phil/src/swagger-parser/node_modules/node-fetch/src/index.js from /Users/phil/src/swagger-parser/test/specs/real-world/fetch-api-list.js not supported.
Instead change the require of index.js in /Users/phil/src/swagger-parser/test/specs/real-world/fetch-api-list.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/Users/phil/src/swagger-parser/test/specs/real-world/fetch-api-list.js:3:15)
at Object. (/Users/phil/src/swagger-parser/test/specs/real-world/real-world.spec.js:6:22)
at async Promise.all (index 0)
at async formattedImport (/Users/phil/src/swagger-parser/node_modules/mocha/lib/nodejs/esm-utils.js:7:14)
at async Object.exports.requireOrImport (/Users/phil/src/swagger-parser/node_modules/mocha/lib/nodejs/esm-utils.js:48:32)
at async Object.exports.loadFilesAsync (/Users/phil/src/swagger-parser/node_modules/mocha/lib/nodejs/esm-utils.js:88:20)
at async singleRun (/Users/phil/src/swagger-parser/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/Users/phil/src/swagger-parser/node_modules/mocha/lib/cli/run.js:374:5)

If anyone can figure that out in a PR I will be able to release this 3.1 support and all the other recent improvements.

@philsturgeon
Copy link
Member

Ah that was easy, I just bumped fetch back to v2, but I've got some other issues now. If anyone can help I appreciate it. #191

@gabimoncha
Copy link

@philsturgeon v10.0.3 still throws Unsupported OpenAPI version: 3.1.0. Swagger Parser only supports versions 3.0.0, 3.0.1, 3.0.2, 3.0.3

@gigaga
Copy link

gigaga commented Sep 6, 2022

Same for me. Any change to have a support for OpenAPI 3.1.0 ?
Regards,

@swidbert
Copy link

Any update on this?

@philsturgeon
Copy link
Member

@swidbert v10.1.0 was meant to include the v3.1.0 changes. Are you having problems with that version?

@kdawgwilk
Copy link

What changes in 10.1.0 addressed this issue? Looking through the changes it appears that it was mostly CI changes v10.0.5...v10.1.0

@philsturgeon
Copy link
Member

This PR was meant to add support for OAS v3.1, if it didn't we should figure out whats gone wrong. #187

@swidbert
Copy link

swidbert commented Jan 4, 2023

Many thanks for the feedback.
I have been able to identify and solve my problem.

@charlie-retzler
Copy link

The issue I had with upgrading from v10.0.3 to v10.1.0 was that the npm package name had to changed from swagger-parser to @apidevtools/swagger-parser. I had to remove the old package and reinstall the new package to get OAS v3.1 support.

@philsturgeon
Copy link
Member

Yeah swagger-parser has been deprecated as it was only an alias of the namespaces version and maintaining both was extra problematic. Use the namespaced package to get latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants