noirbizarre / flask-restplus

Fully featured framework for fast, easy and documented API development with Flask
http://flask-restplus.readthedocs.org
Other
2.74k stars 506 forks source link

Unable to set requestInterceptor (Configuration of Swagger) #793

Open akshayhashedIn opened 4 years ago

akshayhashedIn commented 4 years ago

Configuration file

SWAGGER_REQUEST_INTERCEPTOR = "(request) => { // Do something }" SWAGGER_UI_REQUEST_INTERCEPTOR = "(request) => { // Do something }"

app.py

app.config.SWAGGER_REQUEST_INTERCEPTOR = "(request) => { // Do something }"
app.config.SWAGGER_UI_REQUEST_INTERCEPTOR = "(request) => { // Do something }"

Expected Behavior

I am not sure what is the actual name of the configuration to set requestInterceptor of Swagger as I was not able to find it (https://flask-restplus.readthedocs.io/en/stable/swagger.html#swagger-ui)

The expectation is to have the function mentioned in the configuration to be run as the request interceptor.

Actual Behavior

The configuration which I am using doesn't seem to have any effect. What is the correct name of the configuration? Is it supported?

Environment