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

Fix parameter replacement in swagger importer #861

Merged
merged 1 commit into from Apr 13, 2018

Conversation

Projects
None yet
2 participants
@avdv
Contributor

avdv commented Apr 13, 2018

The regex was greedily matching any character which causes problems with
multiple path parameters in a route:

input: /api/v1/{channel}/items/{id}
output: /api/v1/{{ channel}/items/{id }}

Notice that it matched from the first { to the last }.

Fix parameter replacement in swagger importer
The regex was greedily matching any character which causes problems with
multiple path parameters in a route and it was only replacing once:

input: `/api/v1/{channel}/items/{id}`
output: `/api/v1/{{ channel}/items/{id }}`
@welcome

This comment has been minimized.

welcome bot commented Apr 13, 2018

💖 Thanks for opening this pull request! 💖

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

@gschier

Nice one! 😄

@gschier gschier merged commit 28a0b7d into getinsomnia:develop Apr 13, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@welcome

This comment has been minimized.

welcome bot commented Apr 13, 2018

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