Skip to content
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

CONFIG file with urls array doesn't work starting with v3.19.5 #5068

Closed
CameronGo opened this issue Dec 7, 2018 · 3 comments
Closed

CONFIG file with urls array doesn't work starting with v3.19.5 #5068

CameronGo opened this issue Dec 7, 2018 · 3 comments

Comments

@CameronGo
Copy link

Q&A (please complete the following information)

Browser is Chrome.
Running swagger UI using Docker image. v3.19.4 works, v3.19.5 - v3.20.2 is broken.

Content & configuration

{
    "dom_id": "#swagger-ui",
    "deepLinking": true,
    "docExpansion": "none",
    "urls": [
        {
            "name": "v2",
            "url": "https://URL/v2/openapi.yaml"
        },
        {
            "name": "v3",
            "url": "https://URL/v3/openapi.yaml"
        }
    ]
}

Example Swagger/OpenAPI definition:
N/A

Describe the bug you're encountering

Starting with v3.19.0 using the CONFIG_URL you could reference a config.json file, which had an array of urls to return different API spec documents. This worked as recently as v3.19.4, but starting with v3.19.5 this behavior is broken and appears to be the case with the latest v3.20.2 versions as well.

When you use the same config with these newer versions, Swagger UI comes up, the config is retrieved (I can tell b/c of the visual changes related to docExpansion, etc) but the API spec that is loaded is the default Petstore.

With further testing I determined that, if I create multiple items in the config.json urls array, the inital page load returns Petstore, but I can select another spec from the menu and this loads the correct API spec at which point I can toggle back and forth and the correct API spec is loaded.

To reproduce...

image

@CameronGo
Copy link
Author

I suspect this may have to do with this change? #5005

@smn-snkl
Copy link

smn-snkl commented Jan 9, 2019

Same here. My workaround is to also add the url parameter. Seems to work for now ...

@shockey
Copy link
Contributor

shockey commented Feb 12, 2019

This should be fixed in the current version, via #5161 😄

@shockey shockey closed this as completed Feb 12, 2019
@lock lock bot locked and limited conversation to collaborators Feb 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants