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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAPI v3 importer #1430

merged 13 commits into from Apr 18, 2019


None yet
2 participants
Copy link

commented Apr 9, 2019

Hi! 馃憢

The issue over at #281 was a catch-all for Swagger/OpenAPI, and some folks were after OpenAPI v3 support. This PR addresses that.

This PR doesn't try to implement the complete spec at all, but it does do the bulk of the work for the import. I'd consider it complete at a functional level, and we could accept future PRs for enhancements. Open to suggestion though :)

As this is a first step, I based my development on the exist fixtures. My testing strategy was to convert swagger2 test input to openapi3, and use the same outputs for verification. I did that via:

  • open
  • paste existing swagger2 test -input file
  • (transform JSON->YAML when asked, if necessary)
  • Edit > Convert to OpenAPI 3
  • export (as JSON or YAML, depending on existing test)

So, with this, we retain the same functionality that we had. Two output JSONs needed updating, but I suspect it might have been a bug in the swagger2 implementation (when there was an empty body, it was still specifying a body: { mimeType: 'application/json' }). This is visible in 007c9ae.


This comment has been minimized.

Copy link

commented Apr 9, 2019

馃挅 Thanks for opening this pull request! 馃挅

To help make this a smooth process, please be sure you have first read the
contributing guidelines.


This comment has been minimized.

Copy link
Contributor Author

commented Apr 9, 2019

Oof, test fixtures:


Copy link

left a comment

This is awesome @notjosh! Very smart to use the same converted fixtures for the tests 馃憤

@gschier gschier merged commit 67db01d into getinsomnia:develop Apr 18, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

commented Apr 18, 2019

Congrats on merging your first pull request! 馃帀馃帀馃帀 You're helping make Insomnia awesome! 馃檶

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.