manosim / django-rest-framework-docs

Document Web APIs made with Django Rest Framework
https://www.drfdocs.com/
BSD 2-Clause "Simplified" License
647 stars 184 forks source link

wrong doc generated when using ModelViewSets #88

Open LiVincent-Zhang opened 8 years ago

LiVincent-Zhang commented 8 years ago

When using ModelViewSets, the apis shown in doc are wrong.

class UserInfoSerializer(ModelSerializer):
    class Meta:
        model = User

class UserInfo(ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserInfoSerializer

urlpatterns = [
    url(r'^docs/', include('rest_framework_docs.urls')),
]

urlpatterns += router.urls

The results in /docs/ are

/docs/users/      OPTIONS
/docs/users/<pk>/  OPTIONS

Is this a already known bug?

gcushen commented 8 years ago

ModelViewSet is not currently supported. Refer to #58 .