Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
__name__,
url_prefix=self.config.get('url_prefix', None),
subdomain=self.config.get('subdomain', None),
template_folder=self.config.get(
'template_folder', 'ui{0}/templates'.format(uiversion)
),
static_folder=self.config.get(
'static_folder', 'ui{0}/static'.format(uiversion)
),
static_url_path=self.config.get('static_url_path', None)
)
blueprint.add_url_rule(
self.config.get('specs_route', '/apidocs/'),
'apidocs',
view_func=wrap_view(APIDocsView().as_view(
'apidocs',
view_args=dict(config=self.config)
))
)
# backwards compatibility with old url style
blueprint.add_url_rule(
'/apidocs/index.html',
view_func=lambda: redirect(url_for('flasgger.apidocs'))
)
else:
blueprint = Blueprint(
self.config.get('endpoint', 'flasgger'),
__name__
)