title: How to use coreapi client with django rest framework?
body: <p>I've integrated django rest framework version 3.10 into an existing django 2.2 project, placing api root at <code>/api</code>.</p>
  
  <p>Now I'm trying to use coreapi cli client to upload some documents to the server.</p>
  
  <pre><code>$ coreapi get http://localhost:8000/openapi
  &lt;DownloadedFile '/root/.coreapi/downloads/openapi (4)', open 'rb'&gt;
  $ coreapi get http://localhost:8000/api
  {
      "invoices": "http://localhost:8000/api/invoices/"
  }
  $ coreapi action invoices list
  Index ['invoices']['list'] did not reference a link. Key 'invoices' was not found.
  </code></pre>
  
  <p><code>/openapi</code> is an endpoint that generates schema upon request and returns</p>
  
  <pre><code>openapi: 3.0.2
  info:
    title: Orka
    version: TODO
    description: API for orka project
  paths:
    /invoices/:
      get:
        operationId: ListInvoices
        parameters: []
        responses:
          '200':
            content:
              application/json:
                schema:
                  required:
                  - file_name
                  - original_file_name
                  properties:
                    file_name:
                      type: string
                    original_file_name:
                      type: string
                      maxLength: 80
                    upload_date:
                      type: string
                      format: date-time
                      readOnly: true
                    data:
                      type: object
                      nullable: true
                    confidence:
                      type: number
                    user_verified:
                      type: boolean
    /invoices/{id}/:
      get:
        operationId: retrieveInvoice
        parameters:
        - name: id
          in: path
          required: true
          description: A unique integer value identifying this Invoice.
          schema:
            type: string
        responses:
          '200':
            content:
              application/json:
                schema:
                  required:
                  - file_name
                  - original_file_name
                  properties:
                    file_name:
                      type: string
                    original_file_name:
                      type: string
                      maxLength: 80
                    upload_date:
                      type: string
                      format: date-time
                      readOnly: true
                    data:
                      type: object
                      nullable: true
                    confidence:
                      type: number
                    user_verified:
                      type: boolean
  </code></pre>
  
  <p>Nothing complicated and path for invoices exists (even though it should be <code>/api/invoices</code>).</p>
  
  <p>I've successfully got coreapi to work with external apis, so this seems to be problem with how I configure my urls and/or views.</p>
  
  <p>Both of them are dead simple.</p>
  
  <pre class="lang-py prettyprint-override"><code># urls.py
  from rest_framework import routers
  
  from . import views
  
  
  router = routers.DefaultRouter()
  router.register(r'invoices', views.InvoiceViewSet)
  
  urlpatterns = [
      path('api/', include(router.urls)),
  ]
  
  
  # views.py
  # ... imports ...
  
  class InvoiceSerializer(serializers.HyperlinkedModelSerializer):
      """Defines API representation of invoices"""
  
      class Meta:  # pylint:disable=too-few-public-methods, missing-docstring
          model = Invoice
          fields = (
              'file_name',
              'original_file_name',
              'upload_date',
              'data',
              'confidence',
              'user_verified',
          )
  
  
  class InvoiceViewSet(viewsets.ModelViewSet):
      """Defines api views for invoices"""
      # default permissions are set in settings.py
      parser_classes = (JSONParser, XMLParser, FormParser, MultiPartParser)
      queryset = Invoice.objects.all()
      serializer_class = InvoiceSerializer
  
      @action(methods=['post'], detail=True)
      def upload_with_ground_truth_file(self, request, pk):
          pass
  </code></pre>
  
  <p>It seems that I'm missing something glaringly obvious. What do I need to configure so I can use coreapi client to consume my api?</p>