Skip to content

I would like to pass in a Config URL using an environment variable similar to the API_URL #4861

@CameronGo

Description

@CameronGo

Is your feature request related to a problem?

I am running swagger ui in a docker container and passing my openapi.yml file in using the API_URL environment variable. This allows me to use the public docker image for swagger ui without having to build and maintain my own. I would; however, like to do deeper customization of the display and layout options using a config file, but do not see a way to reference a URL to a config file using an environment variable in a similar way.

Describe the solution you'd like

I would like an environment variable called CONFIG_URL or something of that nature so that this environment variable can be set in my docker container and retrieve the config file at run time.

Describe alternatives you've considered

The only alternatives I can see at the moment are to build my own docker image using the public image as a source and incorporate my config file, or a URL to it in my private image. This isn't ideal IMO.

Additional context

I am basing my understanding of how this currently works on a combination of what is documented here: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md and also the environment variables that appear in the current published Dockerfile here: https://github.com/swagger-api/swagger-ui/blob/master/Dockerfile

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