Skip to content

Commit

Permalink
Get rid of "operationId has collisions" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Oct 8, 2024
1 parent 742f13c commit 0abfb59
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/argus/incident/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,10 @@ def perform_destroy(self, instance):

@extend_schema_view(
list=extend_schema(
operation_id="api_v2_events_list",
parameters=[
OpenApiParameter(name="cursor", description="The pagination cursor value.", type=str),
]
],
)
)
class AllEventsViewSet(mixins.ListModelMixin, viewsets.GenericViewSet):
Expand All @@ -439,6 +440,14 @@ def get_queryset(self):
return Event.objects.all()


@extend_schema_view(
list=extend_schema(
operation_id="api_v2_events_per_incident_list",
parameters=[
OpenApiParameter(name="cursor", description="The pagination cursor value.", type=str),
],
)
)
class EventViewSet(mixins.ListModelMixin, mixins.CreateModelMixin, mixins.RetrieveModelMixin, viewsets.GenericViewSet):
queryset = Incident.objects.none() # For OpenAPI
permission_classes = [IsAuthenticated]
Expand Down

0 comments on commit 0abfb59

Please sign in to comment.