django-rest-framework-docs icon indicating copy to clipboard operation
django-rest-framework-docs copied to clipboard

wrong doc generated when using ModelViewSets

Open LiVincent-Zhang opened this issue 9 years ago • 1 comments

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?

LiVincent-Zhang avatar May 09 '16 15:05 LiVincent-Zhang

ModelViewSet is not currently supported. Refer to #58 .

gcushen avatar May 09 '16 17:05 gcushen