def get_schema_view(title=None, url=None, urlconf=None, renderer_classes=None):
 generator = SchemaGenerator(title=title, url=url, urlconf=urlconf)
 if (renderer_classes is None):
  if (renderers.BrowsableAPIRenderer in api_settings.DEFAULT_RENDERER_CLASSES):
   rclasses = [renderers.CoreJSONRenderer, renderers.BrowsableAPIRenderer]
  else:
   rclasses = [renderers.CoreJSONRenderer]
 else:
  rclasses = renderer_classes
 class SchemaView(APIView, ):
  _ignore_model_permissions = True
  exclude_from_schema = True
  renderer_classes = rclasses
  def get(self, request, *args, **kwargs):
   schema = generator.get_schema(request)
   if (schema is None):
    raise exceptions.PermissionDenied()
   return Response(schema)
 return SchemaView.as_view()

def get_schema_view ( title = None , url = None , urlconf = None , renderer_classes = None ) : generator = SchemaGenerator ( title = title , url = url , urlconf = urlconf ) if ( renderer_classes is None ) : if ( renderers . BrowsableAPIRenderer in api_settings . DEFAULT_RENDERER_CLASSES ) : rclasses = [ renderers . CoreJSONRenderer , renderers . BrowsableAPIRenderer ] else : rclasses = [ renderers . CoreJSONRenderer ] else : rclasses = renderer_classes class SchemaView ( APIView , ) : _ignore_model_permissions = True exclude_from_schema = True renderer_classes = rclasses def get ( self , request , * args , ** kwargs ) : schema = generator . get_schema ( request ) if ( schema is None ) : raise exceptions . PermissionDenied ( ) return Response ( schema ) return SchemaView . as_view ( )
return a schema view .