Skip to content

Commit

Permalink
Merge pull request #757 from oppgjorskontoret/allow-inserting-arbitra…
Browse files Browse the repository at this point in the history
…ry-references

Allow specifying response as a reference
  • Loading branch information
JoelLefkowitz authored Jul 17, 2022
2 parents 1b03e72 + 6670052 commit 6745ddb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/drf_yasg/inspectors/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ def get_response_schemas(self, response_serializers):
description='',
schema=serializer,
)
elif isinstance(serializer, openapi._Ref):
response = serializer
else:
serializer = force_serializer_instance(serializer)
response = openapi.Response(
Expand Down

0 comments on commit 6745ddb

Please sign in to comment.