-
Notifications
You must be signed in to change notification settings - Fork 101
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
Support missing deployedDomain / basePath prefix #42
Comments
You're right, due to the (latest?) Swagger spec it's allowed to leave out the Yes of course, please PR :-) |
Hi, swagger UI is in my case reachable at the following endpoint (all here are examples) : localhost:12345. All the calls are against localhost:12345/myapi/myversion. However, I don't want to specify a deployedDomain, since I have the application available at different hosts (example.com ; example2.com). The plugin always appends at the moment the project name to the basePath, so swagger tries to make the curl requests agains localhost:12345/APPLICATION_NAME/myapi/myversion, which is not what I would expect. Could I somehow solve this issue? Thanks! :) |
I have an application that is not bound to a single domain, but runs on multiple environments (also locally).
SwaggerUI has the behavior that the current server address and port is used automatically, if the element
host
is missing inswagger.json
.Therefore it would be useful, if the element
host
is not generated intoswagger.json
, if thedeployedDomain
element is missing, instead of usingexample.com
.Swagger will automatically use for example
http://localhost:8080
orhttp://192.168.1.2
(hostname / IP, depending on the client).The problem left is the application name, which is not used. The examples look like this
http://localhost:8080/resources/pet/...
but should behttp://localhost:8080/APPLICATION_NAME/resources/pet/...
One possible solution would be to introduce a basePath prefix, which is the application name. So instead of
resources
it would becomeapplication-name/resources
.Edit: moved the issue to the correct project
The text was updated successfully, but these errors were encountered: