From c593b3fcfb84fc27a7847fcc7285d8ec2d668641 Mon Sep 17 00:00:00 2001 From: Cristi Vijdea Date: Wed, 27 Feb 2019 21:50:19 +0200 Subject: [PATCH] Remove _summary_and_description_compat --- src/drf_yasg/inspectors/view.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/drf_yasg/inspectors/view.py b/src/drf_yasg/inspectors/view.py index 6dd739d..3a94f6c 100644 --- a/src/drf_yasg/inspectors/view.py +++ b/src/drf_yasg/inspectors/view.py @@ -21,17 +21,6 @@ class SwaggerAutoSchema(ViewInspector): super(SwaggerAutoSchema, self).__init__(view, path, method, components, request, overrides) self._sch = AutoSchema() self._sch.view = view - self._summary_and_description_compat() - - def _summary_and_description_compat(self): - # TODO: remove in 1.14 - base_methods = (SwaggerAutoSchema.get_summary, SwaggerAutoSchema.get_description) - self_methods = (type(self).get_summary, type(self).get_description) - if self_methods != base_methods: - raise NotImplementedError( - "`SwaggerAutoSchema` methods `get_summary` and `get_description` were removed in " - "drf-yasg 1.13 and will have no effect. Override `get_summary_and_description` instead." - ) def get_operation(self, operation_keys): consumes = self.get_consumes() @@ -362,22 +351,6 @@ class SwaggerAutoSchema(ViewInspector): return summary, description - def get_summary(self): - """Return a summary description for this operation. - - :return: the summary - :rtype: str - """ - return self.get_summary_and_description()[0] - - def get_description(self): - """Return an operation description determined as appropriate from the view's method and class docstrings. - - :return: the operation description - :rtype: str - """ - return self.get_summary_and_description()[1] - def get_security(self): """Return a list of security requirements for this operation.