Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Apr 25, 2024
1 parent b23cab4 commit 11c2d21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/api/openapi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import inspect
from typing import Any

from drf_yasg.inspectors import SwaggerAutoSchema
Expand Down Expand Up @@ -63,7 +64,7 @@ def get_response_schemas(
definitions = self.components.with_scope(SCHEMA_DEFINITIONS)

for status_code in list(response_serializers):
if isinstance(response_serializers[status_code], type) and issubclass(
if inspect.isclass(response_serializers[status_code]) and issubclass(
model_cls := response_serializers[status_code], BaseModel
):
model_json_schema = model_cls.model_json_schema(
Expand Down

0 comments on commit 11c2d21

Please sign in to comment.