Repository: encode/django-rest-framework

Issue:
Invalid `CursorPagination` schema type
## Checklist

- [x] I have verified that that issue exists against the `master` branch of Django REST framework.
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] This is not a usage question. (Those should be directed to the [discussion group](https://groups.google.com/forum/#!forum/django-rest-framework) instead.)
- [x] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-packages) where possible.)
- [x] I have reduced the issue to the simplest possible case.
- [ ] I have included a failing test as a pull request. (If you are unable to do so we can still accept the issue.)

## Steps to reproduce
1. Create custom cursor pagination class
`pagination.py`

```python
from rest_framework.pagination import CursorPagination


class AuthLogCursorPagination(CursorPagination):
    page_size = 50
    page_size_query_param = "page_size"
    ordering = "-created_at"
```

2. Register `AuthLogCursorPagination` in APIView
`views.py`

```python
from rest_framework.generic import ListAPIView

from app.models import AuthLog
from app.api.pagination import AuthLogCursorPagination
from app.api.serializers import AuthLogSerializer


class AuthLogsAPIView(ListAPIView):
    queryset = AuthLog.objects.all()
    serializer_class = AuthLogSerializer
    pagination_class = AuthLogCursorPagination
```

3. Register view
`urls.py`

```python
from rest_framework.schemas import get_schema_view

from app.api.views import AuthLogsAPIView


urlpatterns = [
    path("authlog/", AuthLogsAPIView.as_view()),
    path("openapi", get_schema_view(
        title="Your Project",
        description="API for all things …",
        version="1.0.0"
    ), name="openapi-schema"),
]
```

4. Open /openapi and check /authlog/ endpoint generated spec

## Expected behavior
```yaml
  /authlog/:
    get:
      operationId: listAuthLogs
      description: ''
      parameters:
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: string
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
```

## Actual behavior
```yaml
  /authlog/:
    get:
      operationId: listAuthLogs
      description: ''
      parameters:
      - name: cursor
        required: false
        in: query
        description: The pagination cursor value.
        schema:
          type: integer  # <---- INVALID
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
```

`cursor` parameter schema type must be `string`, got `integer` instead.



Discussion:

Resolving patch:
diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py
--- a/rest_framework/pagination.py
+++ b/rest_framework/pagination.py
@@ -961,7 +961,7 @@ def get_schema_operation_parameters(self, view):
                 'in': 'query',
                 'description': force_str(self.cursor_query_description),
                 'schema': {
-                    'type': 'integer',
+                    'type': 'string',
                 },
             }
         ]


Test patch: