prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  RESTAPI document fix for Upstream Pulp Replication API
  **Version**
  Pulp installed through the Python modules.
  "core:3.28.0"
  "certguard:3.28.0"
  "file:3.28.0"
  "python:3.28.0"
  "rpm:3.28.0"
  
  **Describe the bug**
  Why the attributes of **upstream_pulps_create**/**update**  is mentioned again in the **upstream_pulps_replicate" document? Are those attributes (base_url, api_root, domain,...) used at time making an API request "https://PULP-SERVER/pulp/api/v3/upstream_pulps/{object_id}/replicate/"?
  
  **To Reproduce**
  None.
  
  **Expected behavior**
  A fix is required in the REST API document.
  
  **Additional context**
  Create Upstream Pulp API document: https://docs.pulpproject.org/pulpcore/restapi.html#tag/Upstream-Pulps/operation/upstream_pulps_create
  Upstream Replication API document: https://docs.pulpproject.org/pulpcore/restapi.html#tag/Upstream-Pulps/operation/upstream_pulps_replicate
  
  
  
  </issue>
  <code>
  [start of pulpcore/app/viewsets/replica.py]
  1 """
  2 ViewSet for replicating repositories and distributions from an upstream Pulp
  3 """
  4 from django.conf import settings
  5 from drf_spectacular.utils import extend_schema
  6 from rest_framework import mixins
  7 from rest_framework.decorators import action
  8 
  9 from pulpcore.app.models import TaskGroup, UpstreamPulp
  10 from pulpcore.app.serializers import AsyncOperationResponseSerializer, UpstreamPulpSerializer
  11 from pulpcore.app.viewsets import NamedModelViewSet
  12 from pulpcore.app.response import TaskGroupOperationResponse
  13 from pulpcore.app.tasks import replicate_distributions
  14 from pulpcore.tasking.tasks import dispatch
  15 
  16 
  17 class UpstreamPulpViewSet(
  18     NamedModelViewSet,
  19     mixins.CreateModelMixin,
  20     mixins.RetrieveModelMixin,
  21     mixins.ListModelMixin,
  22     mixins.DestroyModelMixin,
  23     mixins.UpdateModelMixin,
  24 ):
  25     """API for configuring an upstream Pulp to replicate. This API is provided as a tech preview."""
  26 
  27     queryset = UpstreamPulp.objects.all()
  28     endpoint_name = "upstream-pulps"
  29     serializer_class = UpstreamPulpSerializer
  30     ordering = "-pulp_created"
  31 
  32     @extend_schema(
  33         summary="Replicate",
  34         description="Trigger an asynchronous repository replication task group. This API is "
  35         "provided as a tech preview.",
  36         responses={202: AsyncOperationResponseSerializer},
  37     )
  38     @action(detail=True, methods=["post"])
  39     def replicate(self, request, pk):
  40         """
  41         Triggers an asynchronous repository replication operation.
  42         """
  43         server = UpstreamPulp.objects.get(pk=pk)
  44         task_group = TaskGroup.objects.create(description=f"Replication of {server.name}")
  45 
  46         uri = "/api/v3/servers/"
  47         if settings.DOMAIN_ENABLED:
  48             uri = f"/{request.domain.name}{uri}"
  49 
  50         dispatch(
  51             replicate_distributions,
  52             exclusive_resources=[uri],
  53             kwargs={"server_pk": pk},
  54             task_group=task_group,
  55         )
  56 
  57         return TaskGroupOperationResponse(task_group, request)
  58
  [end of pulpcore/app/viewsets/replica.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/viewsets/replica.py b/pulpcore/app/viewsets/replica.py
  --- a/pulpcore/app/viewsets/replica.py
  +++ b/pulpcore/app/viewsets/replica.py
  @@ -33,6 +33,7 @@
           summary="Replicate",
           description="Trigger an asynchronous repository replication task group. This API is "
           "provided as a tech preview.",
  +        request=None,
           responses={202: AsyncOperationResponseSerializer},
       )
       @action(detail=True, methods=["post"])
  
verification_info: {"golden_diff": "diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py\n--- a/pulpcore/app/viewsets/replica.py\n+++ b/pulpcore/app/viewsets/replica.py\n@@ -33,6 +33,7 @@\n         summary=\"Replicate\",\n         description=\"Trigger an asynchronous repository replication task group. This API is \"\n         \"provided as a tech preview.\",\n+        request=None,\n         responses={202: AsyncOperationResponseSerializer},\n     )\n     @action(detail=True, methods=[\"post\"])\n", "issue": "RESTAPI document fix for Upstream Pulp Replication API\n**Version**\r\nPulp installed through the Python modules.\r\n\"core:3.28.0\"\r\n\"certguard:3.28.0\"\r\n\"file:3.28.0\"\r\n\"python:3.28.0\"\r\n\"rpm:3.28.0\"\r\n\r\n**Describe the bug**\r\nWhy the attributes of **upstream_pulps_create**/**update**  is mentioned again in the **upstream_pulps_replicate\" document? Are those attributes (base_url, api_root, domain,...) used at time making an API request \"https://PULP-SERVER/pulp/api/v3/upstream_pulps/{object_id}/replicate/\"?\r\n\r\n**To Reproduce**\r\nNone.\r\n\r\n**Expected behavior**\r\nA fix is required in the REST API document.\r\n\r\n**Additional context**\r\nCreate Upstream Pulp API document: https://docs.pulpproject.org/pulpcore/restapi.html#tag/Upstream-Pulps/operation/upstream_pulps_create\r\nUpstream Replication API document: https://docs.pulpproject.org/pulpcore/restapi.html#tag/Upstream-Pulps/operation/upstream_pulps_replicate\r\n\r\n\n", "before_files": [{"content": "\"\"\"\nViewSet for replicating repositories and distributions from an upstream Pulp\n\"\"\"\nfrom django.conf import settings\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework import mixins\nfrom rest_framework.decorators import action\n\nfrom pulpcore.app.models import TaskGroup, UpstreamPulp\nfrom pulpcore.app.serializers import AsyncOperationResponseSerializer, UpstreamPulpSerializer\nfrom pulpcore.app.viewsets import NamedModelViewSet\nfrom pulpcore.app.response import TaskGroupOperationResponse\nfrom pulpcore.app.tasks import replicate_distributions\nfrom pulpcore.tasking.tasks import dispatch\n\n\nclass UpstreamPulpViewSet(\n    NamedModelViewSet,\n    mixins.CreateModelMixin,\n    mixins.RetrieveModelMixin,\n    mixins.ListModelMixin,\n    mixins.DestroyModelMixin,\n    mixins.UpdateModelMixin,\n):\n    \"\"\"API for configuring an upstream Pulp to replicate. This API is provided as a tech preview.\"\"\"\n\n    queryset = UpstreamPulp.objects.all()\n    endpoint_name = \"upstream-pulps\"\n    serializer_class = UpstreamPulpSerializer\n    ordering = \"-pulp_created\"\n\n    @extend_schema(\n        summary=\"Replicate\",\n        description=\"Trigger an asynchronous repository replication task group. This API is \"\n        \"provided as a tech preview.\",\n        responses={202: AsyncOperationResponseSerializer},\n    )\n    @action(detail=True, methods=[\"post\"])\n    def replicate(self, request, pk):\n        \"\"\"\n        Triggers an asynchronous repository replication operation.\n        \"\"\"\n        server = UpstreamPulp.objects.get(pk=pk)\n        task_group = TaskGroup.objects.create(description=f\"Replication of {server.name}\")\n\n        uri = \"/api/v3/servers/\"\n        if settings.DOMAIN_ENABLED:\n            uri = f\"/{request.domain.name}{uri}\"\n\n        dispatch(\n            replicate_distributions,\n            exclusive_resources=[uri],\n            kwargs={\"server_pk\": pk},\n            task_group=task_group,\n        )\n\n        return TaskGroupOperationResponse(task_group, request)\n", "path": "pulpcore/app/viewsets/replica.py"}]}