prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  The validation of input parameters for the repair endpoint is omitted
  ```
  curl -X POST -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' -d '[]' http://localhost:5001/pulp/api/v3/repair/
  ```
  
  ```
  pulp [804a07335b9f4417ad0c71dde478634e]: django.request:ERROR: Internal Server Error: /pulp/api/v3/repair/
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
      response = get_response(request)
    File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
      response = wrapped_callback(request, *callback_args, **callback_kwargs)
    File "/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
      return view_func(*args, **kwargs)
    File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
      return self.dispatch(request, *args, **kwargs)
    File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
      response = self.handle_exception(exc)
    File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
      self.raise_uncaught_exception(exc)
    File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
      raise exc
    File "/usr/local/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
      response = handler(request, *args, **kwargs)
    File "/src/pulpcore/pulpcore/app/views/repair.py", line 27, in post
      verify_checksums = serializer.validated_data["verify_checksums"]
  KeyError: 'verify_checksums'
  ```
  
  </issue>
  <code>
  [start of pulpcore/app/views/repair.py]
  1 from drf_spectacular.utils import extend_schema
  2 from rest_framework.views import APIView
  3 
  4 from pulpcore.app.response import OperationPostponedResponse
  5 from pulpcore.app.serializers import AsyncOperationResponseSerializer, RepairSerializer
  6 from pulpcore.app.tasks import repair_all_artifacts
  7 from pulpcore.tasking.tasks import dispatch
  8 
  9 
  10 class RepairView(APIView):
  11     @extend_schema(
  12         description=(
  13             "Trigger an asynchronous task that checks for missing "
  14             "or corrupted artifacts, and attempts to redownload them."
  15         ),
  16         summary="Repair Artifact Storage",
  17         request=RepairSerializer,
  18         responses={202: AsyncOperationResponseSerializer},
  19     )
  20     def post(self, request):
  21         """
  22         Repair artifacts.
  23         """
  24         serializer = RepairSerializer(data=request.data)
  25         serializer.is_valid()
  26 
  27         verify_checksums = serializer.validated_data["verify_checksums"]
  28 
  29         task = dispatch(repair_all_artifacts, args=[verify_checksums])
  30 
  31         return OperationPostponedResponse(task, request)
  32
  [end of pulpcore/app/views/repair.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/pulpcore/app/views/repair.py b/pulpcore/app/views/repair.py
  --- a/pulpcore/app/views/repair.py
  +++ b/pulpcore/app/views/repair.py
  @@ -22,7 +22,7 @@
           Repair artifacts.
           """
           serializer = RepairSerializer(data=request.data)
  -        serializer.is_valid()
  +        serializer.is_valid(raise_exception=True)
   
           verify_checksums = serializer.validated_data["verify_checksums"]
  
verification_info: {"golden_diff": "diff --git a/pulpcore/app/views/repair.py b/pulpcore/app/views/repair.py\n--- a/pulpcore/app/views/repair.py\n+++ b/pulpcore/app/views/repair.py\n@@ -22,7 +22,7 @@\n         Repair artifacts.\n         \"\"\"\n         serializer = RepairSerializer(data=request.data)\n-        serializer.is_valid()\n+        serializer.is_valid(raise_exception=True)\n \n         verify_checksums = serializer.validated_data[\"verify_checksums\"]\n", "issue": "The validation of input parameters for the repair endpoint is omitted\n```\r\ncurl -X POST -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' -d '[]' http://localhost:5001/pulp/api/v3/repair/\r\n```\r\n\r\n```\r\npulp [804a07335b9f4417ad0c71dde478634e]: django.request:ERROR: Internal Server Error: /pulp/api/v3/repair/\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py\", line 47, in inner\r\n    response = get_response(request)\r\n  File \"/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py\", line 181, in _get_response\r\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n  File \"/usr/local/lib/python3.8/site-packages/django/views/decorators/csrf.py\", line 54, in wrapped_view\r\n    return view_func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.8/site-packages/django/views/generic/base.py\", line 70, in view\r\n    return self.dispatch(request, *args, **kwargs)\r\n  File \"/usr/local/lib/python3.8/site-packages/rest_framework/views.py\", line 509, in dispatch\r\n    response = self.handle_exception(exc)\r\n  File \"/usr/local/lib/python3.8/site-packages/rest_framework/views.py\", line 469, in handle_exception\r\n    self.raise_uncaught_exception(exc)\r\n  File \"/usr/local/lib/python3.8/site-packages/rest_framework/views.py\", line 480, in raise_uncaught_exception\r\n    raise exc\r\n  File \"/usr/local/lib/python3.8/site-packages/rest_framework/views.py\", line 506, in dispatch\r\n    response = handler(request, *args, **kwargs)\r\n  File \"/src/pulpcore/pulpcore/app/views/repair.py\", line 27, in post\r\n    verify_checksums = serializer.validated_data[\"verify_checksums\"]\r\nKeyError: 'verify_checksums'\r\n```\n", "before_files": [{"content": "from drf_spectacular.utils import extend_schema\nfrom rest_framework.views import APIView\n\nfrom pulpcore.app.response import OperationPostponedResponse\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer, RepairSerializer\nfrom pulpcore.app.tasks import repair_all_artifacts\nfrom pulpcore.tasking.tasks import dispatch\n\n\nclass RepairView(APIView):\n    @extend_schema(\n        description=(\n            \"Trigger an asynchronous task that checks for missing \"\n            \"or corrupted artifacts, and attempts to redownload them.\"\n        ),\n        summary=\"Repair Artifact Storage\",\n        request=RepairSerializer,\n        responses={202: AsyncOperationResponseSerializer},\n    )\n    def post(self, request):\n        \"\"\"\n        Repair artifacts.\n        \"\"\"\n        serializer = RepairSerializer(data=request.data)\n        serializer.is_valid()\n\n        verify_checksums = serializer.validated_data[\"verify_checksums\"]\n\n        task = dispatch(repair_all_artifacts, args=[verify_checksums])\n\n        return OperationPostponedResponse(task, request)\n", "path": "pulpcore/app/views/repair.py"}]}