Skip to content

Conversation

@Dsolnik
Copy link

@Dsolnik Dsolnik commented Dec 23, 2020

This provides an alternative approach to adding swagger ui function parameters that supports older browsers.

I took the code from #35 written by @carlosreif and made some updates so that it would be able to support older browsers.

To pass a function parameter, the requester must be sure to name the function the same as the name of the parameter.

i.e.

get_swagger_ui_blueprint(prefix, url, config={'requestInterceptor':'function requestInterceptor(req){}'})

To pass a function in as a parameter (i.e. requestInterceptor), you must
ensure that in the code you write you define the function to have the same
name as the parameter.
@Dsolnik Dsolnik changed the title Added option to pass function parameters into SwaggerUI bundle creation. allow interceptors to be parsed as js functions UPDATED Dec 23, 2020
Updated README.md to show function parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant