-
-
Notifications
You must be signed in to change notification settings - Fork 526
Allow disabling adding any generated servers to the OpenAPI servers list #1597
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
Comments
use |
@bnasslahsen Seriously! You don't even ask if I already tried that! Very rude to simply close this ticket without asking some feedback first! Anyways, the problem with the So, either that behaviour is a bug that needs to be fixed, which I am not sure of, or a property would be nice that disables the behaviour of a generated server. |
Your initial comment is not even respecting the provided guidelines. Remember, contributions to this repository should follow its contributing guidelines and code of conduct. |
@bnasslahsen What do you mean, it doesn't follow the guidelines? I filled in the template as provided by Github, when I created this issue. What are you missing and I happily provide it. Also I am using Springdoc 1.6.6 (I should have mentioned this, but it wasn't being asked in the issue template). |
Try reading the contributing guidelines. |
@bnasslahsen I have read the contribution guidelines, and have believe I have complied to it in a reasonable fashion. But it seems you are not willing to tell what I did wrong. That is a pity, because this way I can't apply any corrections. What I don't understand is that you do all this effort to provide this open source project and then you act like this against those that are using your project and are even willing to contribute to it (I wanted to contribute #1596 but in that case you where so friendly to actually already implement it). I understand you probably get a lot of issues reported that lack information because people didn't follow the your Github issue template (and please make sure that the Github template contains all the information that you want to get from someone , because people are not going to read the contribution guidelines all the time. That is just human nature), but I actually did my best to comply. I my self am a framework developer and I know this frustration all too well. |
+1 |
We have a network setup where the host provided by the HTTP Request is not the actual host from which the user is requesting the OpenAPI definition. This results in a
Server
being added to theOpenAPI
definition with the incorrect host name. Until now we have workaround this by simply not defining any servers, and in that case our SwaggerUI will figure out the correct one based on the browser URL.However with SpringDoc I haven't found a way to prevent any servers from being added to the
OpenAPI
definition.Can you add a property with which we can disable that a server is added to the OpenAPI definition automatically, when none is already present?
An alternative for us would be that we would need to require our developers to define the server manually per environment that they deploy their application on. However this is cumbersome and error prone. Simply not providing any servers is an easier and more reliable solution.
I have also tried overriding the server list with a server that uses an empty url string. Although Swagger UI can deal with this, it looks rather weird within the API definition and IMHO should not be the way to go.
The text was updated successfully, but these errors were encountered: