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

How to set configuration values dynamically #19

Open informatica92 opened 4 years ago

informatica92 commented 4 years ago

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

CMCDragonkai commented 4 years ago

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?

informatica92 commented 3 years ago

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

PWZER commented 2 years ago

@informatica92 You can see SwaggerUI Configuration