swagger-api / swagger-api/swagger-ui
Detecting default server url
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Is your feature request related to a problem?
We have different server urls: localhost, review apps, staging and production. Everytime one uses
swagger ui, they have to pick correct server first. Currently default server url is the first configured, this can be confusing since swagger is sending request somewhere else, getting one to think something is wrong with the current url.
Describe the solution you'd like
It would be intuitive if server url was picked to match the browser url from where
swagger ui is served (if it does match).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names Swagger UI's configured server selection but no files, tests, or entry points. Start by locating the logic that chooses the first configured server and the code exposing the browser URL; verify behavior when the browser URL matches a configured server and when it does not. Done means Swagger UI selects the matching server by default without changing the fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100