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

Create default environments on openapi import using server url #3267

Merged

Conversation

anusreesubash
Copy link
Contributor

@anusreesubash anusreesubash commented Oct 8, 2024

Fixes: #1239
Closes PRs: #1240, #2261

  1. Instead of separate variables protocol and host, this change creates a single environment variable basePath
  2. Loops through all server urls and create environments for each of them separately
  3. Creates environments using the server description if that doesnot exists creates environment as Environment 1(2, 3, ...)
Screen.Recording.2024-10-08.161058.mp4

@anusreesubash anusreesubash marked this pull request as ready for review October 8, 2024 10:45
@anusreesubash anusreesubash changed the title added option to create environments using server urls Create default environments on openapi import using server url Oct 8, 2024
@kevinpapst
Copy link

kevinpapst commented Oct 10, 2024

Looks fantastic, so I can finally use OpenAPI imports with Bruno. Up until now this missing piece is the one major pain point and the reason why I never really used Bruno since I purchased it months ago. Thanks for working on it 👍

For everyone else reading, you can achieve the baseUrl with a Pre Request script, which you save in your Collection:

req.setUrl(bru.getEnvVar('baseUrl') + req.url);

@helloanoop helloanoop merged commit 40fad99 into usebruno:main Oct 14, 2024
2 checks passed
@kevinpapst
Copy link

@helloanoop this PR was supposed to close #2261 - see initial description - but it is still open

Its-treason pushed a commit to Its-treason/bruno that referenced this pull request Nov 2, 2024
…uno#3267)

* added option to create environments using server urls

* Update openapi-collection.js

---------

Co-authored-by: Anusree Subash <[email protected]>
Co-authored-by: Anoop M D <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] OpenAPI Import: make server protocol and host easily changeable
4 participants