Skip to content

urls config ignored when set in a config file provided through configURL #4455

Open
@Kimamisa

Description

@Kimamisa
Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? NA
Which Swagger-UI version? 3.13.4
How did you install Swagger-UI? npm
Which browser & version? Firefox 59.0.2
Which operating system?

Demonstration API definition

Test using the petstore API def

Configuration (browser query string, constructor, config.yaml)

See below

Expected Behavior

When trying to configure the urls params provided in a configURL, it is ignored.
The following message is displayed: "No API definition provided."

Index HTML:

const ui = SwaggerUIBundle({
    configUrl: "./swagger-config.json"
});

JSON Configuration:

{
        dom_id: "#swagger-ui",
        deepLinking: true,
        presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
        plugins: [SwaggerUIBundle.plugins.DownloadUrl],
        layout: "StandaloneLayout",
        urls: [
            {
                name: "test",
                url: "http://petstore.swagger.io/v2/swagger.json"
            }
        ]
    }

When I use the same configuration directly in the HTML, the urls is well considered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions