swagger-ui-py icon indicating copy to clipboard operation
swagger-ui-py copied to clipboard

How to set configuration values dynamically

Open informatica92 opened this issue 4 years ago • 3 comments

Hi all, I was wondering is, using this api, it would be possible to set some configuration value dynamically. It would be great thinking about the API version for example. In this way we can leave the config file as it is but the version displayed would change automatically according to git tag name or environment variables

informatica92 avatar Jul 06 '20 11:07 informatica92

It seems like one would have to generate the openapi.yaml file somehow. And then route that. One could even add a /openapi.yaml route to the web server, and serve that as the actual config file?

CMCDragonkai avatar Aug 14 '20 07:08 CMCDragonkai

I createad a forked version in order to obtain this. Take a look at: https://github.com/informatica92/swagger-ui-py#why-this-fork

informatica92 avatar Apr 12 '21 14:04 informatica92

@informatica92 You can see SwaggerUI Configuration

PWZER avatar Sep 27 '21 16:09 PWZER