PWZER / swagger-ui-py

Swagger UI for Python web framework, such Tornado, Flask and Sanic. https://pwzer.github.io/swagger-ui-py/
https://pypi.org/project/swagger-ui-py
Apache License 2.0
68 stars 31 forks source link

[BUG] Servers section is broken, prevents usage of "Try it Out" #30

Open iamthebot opened 2 years ago

iamthebot commented 2 years ago

In my generated swagger.json, I see the correctly generated servers section:

"servers": [
        {
            "url": "http://localhost:80/",
            "description": "Local environment"
        },
        {
            "url": "http://foo.com",
            "description": "Main Endpoint"
        }
    ],

But in the swagger UI I see only one autogenerated server with a malformed URL with a comma:

https://somedomain.com/,somedomain.com

I'm guessing it's trying to do some kind of logic to support reverse proxies... but that logic seems broken. Do you know where the code lives for this?