7848 OpenAPI doc generation

This commit is contained in:
Arthur Hanson 2024-11-06 17:05:06 -08:00
parent b184dc35f9
commit c32b681a26

View File

@ -254,6 +254,9 @@ class NetBoxAutoSchema(AutoSchema):
""" """
Generate a docstring for the method. It also takes into account whether the method is for list or detail. Generate a docstring for the method. It also takes into account whether the method is for list or detail.
""" """
if not hasattr(self.view, 'queryset'):
return None
model_name = self.view.queryset.model._meta.verbose_name model_name = self.view.queryset.model._meta.verbose_name
# Determine if the method is for list or detail. # Determine if the method is for list or detail.