manosim / manosim/django-rest-framework-docs

DRFDocs not showing delete, post, etc. options but regular docs do?

Open
#173 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
641
Forks
178
PR merge metrics
No merged PRs in 30d

Description

Heyo! Thanks so much for releasing this, it is beautiful.

I am a little confused on why I'm not seeing POST/DELETE/etc. on the DRF docs version, but I can see it on the regular API docs:

![image](https://user-images.githubusercontent.com/2185159/29245529-a7b5661a-7f91-11e7-87e3-ccb147029687.png)

![image](https://user-images.githubusercontent.com/2185159/29245530-b0892394-7f91-11e7-8239-1132f5283130.png)

Looks like I can only do GET/OPTIONS?

Here's some code:

```python
from rest_framework import viewsets, mixins

from api import serializers
from competitions.models import Competition

class CompetitionViewSet(mixins.ListModelMixin,
mixins.CreateModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
viewsets.GenericViewSet):
"""Tyler loves pizza!!!"""
queryset = Competition.objects.all()
serializer_class = serializers.CompetitionSerializer
```

```python
from django.conf.urls import url, include
from rest_framework import routers

from . import views

router = routers.DefaultRouter()
router.register(r'competitions', views.CompetitionViewSet)

urlpatterns = [
url(r'^', include(router.urls)),

url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),

url(r'^docs/', include('rest_framework_docs.urls')),
]
```

It's probably something silly I'm overlooking, thanks!

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with the shown CompetitionViewSet, router registration, and rest_framework_docs.urls entry point, then compare the DRF docs output with the regular API docs. Done means the documentation view exposes the POST, DELETE, and other methods provided by the viewset mixins, rather than only GET and OPTIONS.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
api, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.