Skip to content

[FEATURE] Custom domain and header support #111

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

Open
1 task done
noraj opened this issue Mar 6, 2025 · 0 comments
Open
1 task done

[FEATURE] Custom domain and header support #111

noraj opened this issue Mar 6, 2025 · 0 comments
Assignees

Comments

@noraj
Copy link

noraj commented Mar 6, 2025

Prerequisites

  • Searched for existing feature requests that may address the problem.

Problem or Use Case

When importing a swagger file that does not include a domain, this extensions add a example.com placeholder domain.

openAPI.getServers().forEach(server -> {
String serverUrl = Optional.ofNullable(server.getUrl())
.filter(url -> url.startsWith("http://") || url.startsWith("https://"))
.orElse("https://example.com");

So for each request, the user have to edit the host header and the domain in the target to be able to send the request.

Proposed Solution

Add settings in the extension that allow to configure a custom domain, so the extension would prepare the requests with that domain instead of example.com and won't have to edit the domain in all requests.

Similarly, an option to add headers could be useful, so when the file is parsed, the custom headers are added to all requests (e.g. a cookie or auth token) so the users don't have to add it manually on each request.

Alternative Solutions Considered

I don't see an alternative

Example

If defined use custom domain set in settings else use default example.com.

It could also have priority, if set, over a domain in the swagger file, in case the user want to overwrite it.

Add any other context, screenshots, or references about the feature request here.

N/A

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

No branches or pull requests

2 participants