@@ -293,7 +293,6 @@ def get_schema(self, request=None, public=False):
293293 schema = super ().get_schema (request , public )
294294
295295 components_schemas = {}
296- security_schemes_schemas = {}
297296
298297 # Iterate endpoints generating per method path operations.
299298 paths = {}
@@ -332,19 +331,6 @@ def get_schema(self, request=None, public=False):
332331
333332 components_schemas .update (components )
334333
335- if hasattr (view .schema , 'get_security_schemes' ): # pragma: no cover
336- security_schemes = view .schema .get_security_schemes (path , method )
337- else :
338- security_schemes = {}
339- for k in security_schemes .keys (): # pragma: no cover
340- if k not in security_schemes_schemas :
341- continue
342- if security_schemes_schemas [k ] == security_schemes [k ]:
343- continue
344- warnings .warn ('Securit scheme component "{}" has been overriden with a different '
345- 'value.' .format (k ))
346- security_schemes_schemas .update (security_schemes ) # pragma: no cover
347-
348334 if hasattr (view , 'action' ):
349335 view .action = current_action
350336 # Normalise path for any provided mount url.
@@ -361,8 +347,6 @@ def get_schema(self, request=None, public=False):
361347 schema ['paths' ] = paths
362348 schema ['components' ] = self .jsonapi_components
363349 schema ['components' ]['schemas' ].update (components_schemas )
364- if len (security_schemes_schemas ) > 0 : # pragma: no cover
365- schema ['components' ]['securitySchemes' ] = security_schemes_schemas
366350
367351 return schema
368352
@@ -469,10 +453,6 @@ def get_operation(self, path, method, action=None):
469453 operation = {}
470454 operation ['operationId' ] = self .get_operation_id (path , method )
471455 operation ['description' ] = self .get_description (path , method )
472- if hasattr (self , 'get_security_requirements' ): # pragma: no cover
473- security = self .get_security_requirements (path , method )
474- if security is not None :
475- operation ['security' ] = security
476456
477457 parameters = []
478458 parameters += self .get_path_parameters (path , method )
0 commit comments