some_name_dev
some_name_dev

Reputation: 83

How does one hide the Response Class in Django REST Swagger?

I am trying to hide the Response Class (Model and Model Schema) from API docs I am writing via Django REST Swagger.

I thought maybe I could set @APIModelProperty(hidden=true) - but no luck. I can't seem to find anything in the Django REST Swagger docs either.

Any ideas? Thanks.

Upvotes: 2

Views: 725

Answers (1)

GummiB
GummiB

Reputation: 78

You can use the YAML Docstring: http://django-rest-swagger.readthedocs.io/en/latest/yaml.html

Use the parameter omit_serializer:

"""
Method description here
---
omit_serializer: true
"""

Upvotes: 1

Related Questions