I am configuring Swagger in my project using Python Flask. The API which I am invoking from swagger needs the token bearer and that token bearer can be fetched by invoking other API(/GetToken) ( which need basic auth).
I need to automate this process when ever user is invoking a API from swagger the swagger should automatically call /GetToken and set the bearer token. (kind of Pre-request script in postman)
I tried implementing this by using @app.before_request but seems swagger itself is invoking the API without coming back to python once the App start.
I tried looking the same at swagger documentation but found None.