Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Hide some classes from doc #805

Open
pratibhajagnere opened this issue Jun 12, 2019 · 0 comments
Open

Hide some classes from doc #805

pratibhajagnere opened this issue Jun 12, 2019 · 0 comments

Comments

@pratibhajagnere
Copy link

Hi,

I have Django 2.1 and latest DRF. I installed latest django-rest-swagger.

I have some APIs in CBV. My urls.py use path instead of url like below which is similar to urls.py from https://docs.djangoproject.com/en/2.2/intro/overview/

from . import views

from rest_framework_swagger.views import get_swagger_view
schema_view = get_swagger_view(title='Demo Swagger API')

urlpatterns = [
    path('users', UserView.as_view(), name='user'),
    path('users/<int:year>/', UserView.as_view(), name='user_yearwise'),
    path('swagger/', schema_view)
]

I tried below code in views.py for

from rest_framework.views import APIView

class UserView(APIView):
    exclude_from_schema = True
    def post(self, request):
         #do stuff

But it is not working. what am I doing wrong?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant