def set_context(self, renderer_context, swagger=None):
    renderer_context['title'] = ((swagger.info.title or '') if swagger else '')
    renderer_context['version'] = ((swagger.info.version or '') if swagger else '')
    renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config())
    renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
    renderer_context.update(self.get_auth_urls())
def set_context(self, renderer_context, swagger=None):
    renderer_context['title'] = ((swagger.info.title or ) if swagger else )
    renderer_context['version'] = ((swagger.info.version or ) if swagger else )
    renderer_context['oauth2_config'] = json.dumps(self.get_oauth2_config())
    renderer_context['USE_SESSION_AUTH'] = swagger_settings.USE_SESSION_AUTH
    renderer_context.update(self.get_auth_urls())