Forum Discussion
Thanks for the additional details.
I imagine you're including Swagger UI as a connexion module, and not deploying it on your own. Based on what you're describing, it seems like an issue with the connexion configuration rather than with Swagger UI.
Swagger UI has no impact on where it is served from. The URL it loads depends on the 'url' parameter in its configuration, so if it doesn't load the file properly, it means the URL being fed to it is wrong.
The try it out functionality depends on the API definition itself, as you already figured out. The catch is that if a relative URL is being used in the 'servers', then it will be relative to the location of the 'openapi.yaml' file.
As a first step of solving this, try fixing the configuration in connexion so that it loads the right URL from start. Unfortunately, connexion is not one of our projects, and I don't know well it enough to guide you towards how to do that.