We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Swagger/ReDoc page raises an error
## Description
<!-- Concisely describe the bug. Compare your experience with what you expected to happen. -->
<!-- For example: "I clicked the 'submit' button and instead of seeing a thank you message, I saw a blank page." -->
While deploying [v2.5.2](https://github.com/WordPress/openverse-api/releases/tag/v2.5.2) to staging, we noticed that the API documentation page failed to render and caused this error:

```
[2022-05-25 17:02:32,253 - django.request - 241][ERROR] Internal Server Error: /v1/
Traceback (most recent call last):
  File "/venv/lib/python3.10/site-packages/drf_yasg/openapi.py", line 110, in __getattr__
    return self[make_swagger_name(item)]
KeyError: 'name'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/views.py", line 67, in sentry_wrapped_callback
    return callback(request, *args, **kwargs)
  File "/venv/lib/python3.10/site-packages/drf_yasg/views.py", line 34, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/venv/lib/python3.10/site-packages/django/utils/decorators.py", line 133, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/venv/lib/python3.10/site-packages/django/views/decorators/vary.py", line 21, in inner_func
    response = func(*args, **kwargs)
  File "/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/venv/lib/python3.10/site-packages/django/views/generic/base.py", line 84, in view
    return self.dispatch(request, *args, **kwargs)
  File "/venv/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/venv/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/venv/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/venv/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/venv/lib/python3.10/site-packages/drf_yasg/views.py", line 94, in get
    schema = generator.get_schema(request, self.public)
  File "/venv/lib/python3.10/site-packages/drf_yasg/generators.py", line 246, in get_schema
    paths, prefix = self.get_paths(endpoints, components, request, public)
  File "/venv/lib/python3.10/site-packages/drf_yasg/generators.py", line 404, in get_paths
    operation = self.get_operation(view, path, prefix, method, components, request)
  File "/venv/lib/python3.10/site-packages/drf_yasg/generators.py", line 446, in get_operation
    operation = view_inspector.get_operation(operation_keys)
  File "/api/catalog/custom_auto_schema.py", line 14, in get_operation
    query = self.get_query_parameters()
  File "/venv/lib/python3.10/site-packages/drf_yasg/inspectors/view.py", line 298, in get_query_parameters
    if len(set(param_list_to_odict(natural_parameters)) & set(param_list_to_odict(serializer_parameters))) != 0:
  File "/venv/lib/python3.10/site-packages/drf_yasg/utils.py", line 266, in param_list_to_odict
    result = OrderedDict(((param.name, param.in_), param) for param in parameters)
  File "/venv/lib/python3.10/site-packages/drf_yasg/utils.py", line 266, in <genexpr>
    result = OrderedDict(((param.name, param.in_), param) for param in parameters)
  File "/venv/lib/python3.10/site-packages/drf_yasg/openapi.py", line 113, in __getattr__
    raise AttributeError("object of class " + type(self).__name__ + " has no attribute " + item)
AttributeError: object of class Parameter has no attribute name
```

Here's the error the page presents:
```
Something went wrong...
Error downloading http://localhost:8000/v1/?format=openapi HTTP ERROR 500

Stack trace

s/<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:44:26651
read/</<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:95:36080


s/<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:44:26651
read/</<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:95:35658

ReDoc Version: 2.0.0-rc.40
Commit: 17b9873
```

## Reproduction
<!-- Provide detailed steps to reproduce the bug. -->
1. `git checkout v2.5.2`
2. `just build`
3. `just recreate && just init`
4. Visit localhost:8000 and observe error

## Additional context
<!-- Add any other context about the problem here; or delete the section entirely. -->
Sentry issue: https://sentry.io/share/issue/83044216200d47538f3733a16df46adc/

## Resolution
<!-- Replace the [ ] with [x] to check the box. -->
- [ ] 🙋 I would be interested in resolving this bug.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `api/catalog/custom_auto_schema.py`
Content:
```
1 from drf_yasg import openapi
2 from drf_yasg.inspectors import SwaggerAutoSchema
3 from drf_yasg.utils import filter_none, force_real_str
4 
5 
6 class CustomAutoSchema(SwaggerAutoSchema):
7     def get_operation(self, operation_keys=None):
8         operation_keys = operation_keys or self.operation_keys
9 
10         consumes = self.get_consumes()
11         produces = self.get_produces()
12 
13         body = self.get_request_body_parameters(consumes)
14         query = self.get_query_parameters()
15         parameters = body + query
16         parameters = filter_none(parameters)
17         parameters = self.add_manual_parameters(parameters)
18 
19         operation_id = self.get_operation_id(operation_keys)
20         summary, description = self.get_summary_and_description()
21         security = self.get_security()
22         assert security is None or isinstance(
23             security, list
24         ), "security must be a list of security requirement objects"
25         deprecated = self.is_deprecated()
26         tags = self.get_tags(operation_keys)
27 
28         responses = self.get_responses()
29 
30         return openapi.Operation(
31             operation_id=operation_id,
32             description=force_real_str(description),
33             summary=force_real_str(summary),
34             responses=responses,
35             parameters=parameters,
36             consumes=consumes,
37             produces=produces,
38             tags=tags,
39             security=security,
40             deprecated=deprecated,
41             **{"x-code-samples": self.overrides.get("code_examples")}
42         )
43
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py
--- a/api/catalog/custom_auto_schema.py
+++ b/api/catalog/custom_auto_schema.py
@@ -4,6 +4,14 @@
 
 
 class CustomAutoSchema(SwaggerAutoSchema):
+    def get_pagination_parameters(self):
+        """
+        Since the pagination params are a part of the ``MediaSearchRequestSerializer``,
+        they need not be added again as pagination params.
+        """
+
+        return []
+
     def get_operation(self, operation_keys=None):
         operation_keys = operation_keys or self.operation_keys

{"golden_diff": "diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py\n--- a/api/catalog/custom_auto_schema.py\n+++ b/api/catalog/custom_auto_schema.py\n@@ -4,6 +4,14 @@\n \n \n class CustomAutoSchema(SwaggerAutoSchema):\n+    def get_pagination_parameters(self):\n+        \"\"\"\n+        Since the pagination params are a part of the ``MediaSearchRequestSerializer``,\n+        they need not be added again as pagination params.\n+        \"\"\"\n+\n+        return []\n+\n     def get_operation(self, operation_keys=None):\n         operation_keys = operation_keys or self.operation_keys\n", "issue": "Swagger/ReDoc page raises an error\n## Description\n<!-- Concisely describe the bug. Compare your experience with what you expected to happen. -->\n<!-- For example: \"I clicked the 'submit' button and instead of seeing a thank you message, I saw a blank page.\" -->\nWhile deploying [v2.5.2](https://github.com/WordPress/openverse-api/releases/tag/v2.5.2) to staging, we noticed that the API documentation page failed to render and caused this error:\n\n```\n[2022-05-25 17:02:32,253 - django.request - 241][ERROR] Internal Server Error: /v1/\nTraceback (most recent call last):\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/openapi.py\", line 110, in __getattr__\n    return self[make_swagger_name(item)]\nKeyError: 'name'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/venv/lib/python3.10/site-packages/django/core/handlers/exception.py\", line 55, in inner\n    response = get_response(request)\n  File \"/venv/lib/python3.10/site-packages/django/core/handlers/base.py\", line 197, in _get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n  File \"/venv/lib/python3.10/site-packages/sentry_sdk/integrations/django/views.py\", line 67, in sentry_wrapped_callback\n    return callback(request, *args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/views.py\", line 34, in _wrapped_view_func\n    response = view_func(request, *args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/django/utils/decorators.py\", line 133, in _wrapped_view\n    response = view_func(request, *args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/django/views/decorators/vary.py\", line 21, in inner_func\n    response = func(*args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py\", line 54, in wrapped_view\n    return view_func(*args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/django/views/generic/base.py\", line 84, in view\n    return self.dispatch(request, *args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/rest_framework/views.py\", line 509, in dispatch\n    response = self.handle_exception(exc)\n  File \"/venv/lib/python3.10/site-packages/rest_framework/views.py\", line 469, in handle_exception\n    self.raise_uncaught_exception(exc)\n  File \"/venv/lib/python3.10/site-packages/rest_framework/views.py\", line 480, in raise_uncaught_exception\n    raise exc\n  File \"/venv/lib/python3.10/site-packages/rest_framework/views.py\", line 506, in dispatch\n    response = handler(request, *args, **kwargs)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/views.py\", line 94, in get\n    schema = generator.get_schema(request, self.public)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/generators.py\", line 246, in get_schema\n    paths, prefix = self.get_paths(endpoints, components, request, public)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/generators.py\", line 404, in get_paths\n    operation = self.get_operation(view, path, prefix, method, components, request)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/generators.py\", line 446, in get_operation\n    operation = view_inspector.get_operation(operation_keys)\n  File \"/api/catalog/custom_auto_schema.py\", line 14, in get_operation\n    query = self.get_query_parameters()\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/inspectors/view.py\", line 298, in get_query_parameters\n    if len(set(param_list_to_odict(natural_parameters)) & set(param_list_to_odict(serializer_parameters))) != 0:\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/utils.py\", line 266, in param_list_to_odict\n    result = OrderedDict(((param.name, param.in_), param) for param in parameters)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/utils.py\", line 266, in <genexpr>\n    result = OrderedDict(((param.name, param.in_), param) for param in parameters)\n  File \"/venv/lib/python3.10/site-packages/drf_yasg/openapi.py\", line 113, in __getattr__\n    raise AttributeError(\"object of class \" + type(self).__name__ + \" has no attribute \" + item)\nAttributeError: object of class Parameter has no attribute name\n```\n\nHere's the error the page presents:\n```\nSomething went wrong...\nError downloading http://localhost:8000/v1/?format=openapi HTTP ERROR 500\n\nStack trace\n\ns/<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:44:26651\nread/</<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:95:36080\n\n\ns/<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:44:26651\nread/</<@http://localhost:8000/static/drf-yasg/redoc/redoc.min.js:95:35658\n\nReDoc Version: 2.0.0-rc.40\nCommit: 17b9873\n```\n\n## Reproduction\n<!-- Provide detailed steps to reproduce the bug. -->\n1. `git checkout v2.5.2`\n2. `just build`\n3. `just recreate && just init`\n4. Visit localhost:8000 and observe error\n\n## Additional context\n<!-- Add any other context about the problem here; or delete the section entirely. -->\nSentry issue: https://sentry.io/share/issue/83044216200d47538f3733a16df46adc/\n\n## Resolution\n<!-- Replace the [ ] with [x] to check the box. -->\n- [ ] \ud83d\ude4b I would be interested in resolving this bug.\n\n", "before_files": [{"content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import SwaggerAutoSchema\nfrom drf_yasg.utils import filter_none, force_real_str\n\n\nclass CustomAutoSchema(SwaggerAutoSchema):\n    def get_operation(self, operation_keys=None):\n        operation_keys = operation_keys or self.operation_keys\n\n        consumes = self.get_consumes()\n        produces = self.get_produces()\n\n        body = self.get_request_body_parameters(consumes)\n        query = self.get_query_parameters()\n        parameters = body + query\n        parameters = filter_none(parameters)\n        parameters = self.add_manual_parameters(parameters)\n\n        operation_id = self.get_operation_id(operation_keys)\n        summary, description = self.get_summary_and_description()\n        security = self.get_security()\n        assert security is None or isinstance(\n            security, list\n        ), \"security must be a list of security requirement objects\"\n        deprecated = self.is_deprecated()\n        tags = self.get_tags(operation_keys)\n\n        responses = self.get_responses()\n\n        return openapi.Operation(\n            operation_id=operation_id,\n            description=force_real_str(description),\n            summary=force_real_str(summary),\n            responses=responses,\n            parameters=parameters,\n            consumes=consumes,\n            produces=produces,\n            tags=tags,\n            security=security,\n            deprecated=deprecated,\n            **{\"x-code-samples\": self.overrides.get(\"code_examples\")}\n        )\n", "path": "api/catalog/custom_auto_schema.py"}], "after_files": [{"content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import SwaggerAutoSchema\nfrom drf_yasg.utils import filter_none, force_real_str\n\n\nclass CustomAutoSchema(SwaggerAutoSchema):\n    def get_pagination_parameters(self):\n        \"\"\"\n        Since the pagination params are a part of the ``MediaSearchRequestSerializer``,\n        they need not be added again as pagination params.\n        \"\"\"\n\n        return []\n\n    def get_operation(self, operation_keys=None):\n        operation_keys = operation_keys or self.operation_keys\n\n        consumes = self.get_consumes()\n        produces = self.get_produces()\n\n        body = self.get_request_body_parameters(consumes)\n        query = self.get_query_parameters()\n        parameters = body + query\n        parameters = filter_none(parameters)\n        parameters = self.add_manual_parameters(parameters)\n\n        operation_id = self.get_operation_id(operation_keys)\n        summary, description = self.get_summary_and_description()\n        security = self.get_security()\n        assert security is None or isinstance(\n            security, list\n        ), \"security must be a list of security requirement objects\"\n        deprecated = self.is_deprecated()\n        tags = self.get_tags(operation_keys)\n\n        responses = self.get_responses()\n\n        return openapi.Operation(\n            operation_id=operation_id,\n            description=force_real_str(description),\n            summary=force_real_str(summary),\n            responses=responses,\n            parameters=parameters,\n            consumes=consumes,\n            produces=produces,\n            tags=tags,\n            security=security,\n            deprecated=deprecated,\n            **{\"x-code-samples\": self.overrides.get(\"code_examples\")}\n        )\n", "path": "api/catalog/custom_auto_schema.py"}]}