title: How to pass a custom schema to a drf detail_route?
body: <p>I have the following route:</p>
  
  <pre><code>@detail_route(methods=['post'], permission_classes=[IsOperator], schema=AutoSchema(manual_fields=[
      coreapi.Field('size', location='query', schema={'type': 'number', 'example': 1024}),
      coreapi.Field('filename', location='query', schema={'type': 'string', 'example': 'telemetry.tlog'})
  ]))
  def get_upload_url(self):
      # ...
  </code></pre>
  
  <p>When I go to a view that shows my schema, I get:</p>
  
  <p>I get the following error:</p>
  
  <pre><code>AttributeError: 'AutoSchema' object has no attribute '_view'
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
    41.             response = get_response(request)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
    187.                 response = self.process_exception_by_middleware(e, request)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
    185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/django/views/decorators/csrf.py" in wrapped_view
    58.         return view_func(*args, **kwargs)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/django/views/generic/base.py" in view
    68.             return self.dispatch(request, *args, **kwargs)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
    489.             response = self.handle_exception(exc)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/views.py" in handle_exception
    449.             self.raise_uncaught_exception(exc)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/views.py" in dispatch
    486.             response = handler(request, *args, **kwargs)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework_swagger/views.py" in get
    32.             schema = generator.get_schema(request=request)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/schemas/generators.py" in get_schema
    279.         links = self.get_links(None if public else request)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/schemas/generators.py" in get_links
    317.             link = view.schema.get_link(path, method, base_url=self.url)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/schemas/inspectors.py" in get_link
    166.         fields = self.get_path_fields(path, method)
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/schemas/inspectors.py" in get_path_fields
    237.         view = self.view
  
  File "/Users/frederikcreemers/.virtualenvs/theproject/lib/python2.7/site-packages/rest_framework/schemas/inspectors.py" in view
    123.         assert self._view is not None, "Schema generation REQUIRES a view instance. (Hint: you accessed `schema` from the view class rather than an instance.)"
  </code></pre>