-
-
Notifications
You must be signed in to change notification settings - Fork 53
Description
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-parser/src/main/java/swurg/workers/Worker.java
Lines 78 to 81 in 3e0a0e7
| 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