title: drf-yasg: How to hide Django rest Framework schema?
body: <p>I use <a href="https://drf-yasg.readthedocs.io/en/stable/custom_spec.html" rel="nofollow noreferrer">drf_yasg swagger</a> for my Django API.
  I would like to know how to easily disable the schema and model.
  <a href="https://i.stack.imgur.com/9nh7k.png" rel="nofollow noreferrer">screenshot</a></p>
  <p>here is my code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from .models import Articles
  from .serializers import ArticlesSerializer
  from rest_framework import viewsets
  from rest_framework.response import Response
  from rest_framework import status
  from rest_framework.authentication import SessionAuthentication,TokenAuthentication, BasicAuthentication
  from rest_framework.views import APIView
  from rest_framework.permissions import IsAuthenticated
  from rest_framework.parsers import JSONParser
  from django.utils.decorators import method_decorator
  from django.contrib.auth import authenticate, login, logout
  from rest_framework.decorators import api_view
  
  from drf_yasg.utils import swagger_auto_schema
  from drf_yasg import openapi
  
  
  @swagger_auto_schema(methods=['get'], operation_description="description", manual_parameters=[
      openapi.Parameter('category', openapi.IN_QUERY, "category1, category2, category3", type=openapi.TYPE_STRING),
      openapi.Parameter('name', openapi.IN_QUERY, "full name", type=openapi.TYPE_STRING),
  ], responses={
      200: openapi.Response('Response', ArticlesSerializer),
  }, tags=['Articles'])
  
  # desactivate POST methode on swagger
  @swagger_auto_schema(method='POST', auto_schema=None)
  
  @api_view(['GET','POST'])   
  def articles(request):
      """
      List all articles.
      """
      if request.user.is_authenticated:
          if request.method == 'GET':
              articles = Articles.objects.all()
              serializer = ArticlesSerializer(Articles, many=True)
              return JsonResponse(serializer.data, safe=False)
  
          elif request.method == 'POST':
              data = JSONParser().parse(request)
              serializer = ArticlesSerializer(data=data)
              if serializer.is_valid():
                  serializer.save()
                  return JsonResponse(serializer.data, status=201)
              return JsonResponse(serializer.errors, status=400)
      return JsonResponse({"status":"403", "message":"User not authenticated"})</code></pre>
  </div>
  </div>
  </p>
  <p>If i add this</p>
  <pre><code>class UserList(APIView):
  swagger_schema = None
  </code></pre>
  <p>i got error:</p>
  <pre><code>AssertionError: `method` or `methods` can only be specified on @action or @api_view views
  </code></pre>
  <p>Code Edited:
  the articles function is pretty simple nothing related to the API, only Python code.</p>
  <p>Here the views Class is also pretty simple.</p>
  <p><strong>Class Views:</strong></p>
  <pre><code>from django.db import models
  
  class Articles(models.Model):
  STATUS = (
     (1, 'PENDING'),
     (2, 'COMPLETED'),
     (3, 'DECLINED'),
     (0, 'BANNED'),
  )
  name = models.CharField(max_length=100)
  ...
  status = models.PositiveSmallIntegerField(
     choices = STATUS,
     default = 1,
  )
  </code></pre>