From 6837717e1539211edce0a7267753f551cd42fbe1 Mon Sep 17 00:00:00 2001 From: betegon Date: Tue, 9 Jun 2026 13:40:29 +0200 Subject: [PATCH 1/2] ref(api): use token operationIds + summary for replay endpoints OpenAPI operationId is meant to be a machine identifier, but Sentry uses the human sentence ("Retrieve a Count of Replays..."). That sentence is what the SDK generator turns into function names and what the docs render as the title and URL slug. Move the sentence into `summary` (the human title) and set `operation_id` to a short camelCase token. The generated SDK gets clean names (`getOrganizationReplayCount`, `listOrganizationReplays`, ...) and, paired with getsentry/sentry-docs#18322, the docs title and SEO-critical URL slug stay byte-identical (both now derive from `summary`). First area of the operationId->token migration; replays chosen as the pilot. --- .../replays/endpoints/organization_replay_count.py | 3 ++- .../replays/endpoints/organization_replay_details.py | 3 ++- .../replays/endpoints/organization_replay_index.py | 3 ++- .../endpoints/organization_replay_selector_index.py | 3 ++- .../replays/endpoints/project_replay_clicks_index.py | 3 ++- src/sentry/replays/endpoints/project_replay_details.py | 3 ++- .../replays/endpoints/project_replay_jobs_delete.py | 9 ++++++--- .../project_replay_recording_segment_details.py | 3 ++- .../endpoints/project_replay_recording_segment_index.py | 3 ++- src/sentry/replays/endpoints/project_replay_viewed_by.py | 3 ++- 10 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/sentry/replays/endpoints/organization_replay_count.py b/src/sentry/replays/endpoints/organization_replay_count.py index 7ec0e7530ceb..94afa51ec269 100644 --- a/src/sentry/replays/endpoints/organization_replay_count.py +++ b/src/sentry/replays/endpoints/organization_replay_count.py @@ -73,7 +73,8 @@ class OrganizationReplayCountEndpoint(OrganizationEventsEndpointBase): @extend_schema( examples=ReplayExamples.GET_REPLAY_COUNTS, - operation_id="Retrieve a Count of Replays for a Given Issue or Transaction", + operation_id="getOrganizationReplayCount", + summary="Retrieve a Count of Replays for a Given Issue or Transaction", parameters=[ GlobalParams.ENVIRONMENT, GlobalParams.ORG_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/organization_replay_details.py b/src/sentry/replays/endpoints/organization_replay_details.py index 16f229d11a27..e91f2c75a1fd 100644 --- a/src/sentry/replays/endpoints/organization_replay_details.py +++ b/src/sentry/replays/endpoints/organization_replay_details.py @@ -233,7 +233,8 @@ class OrganizationReplayDetailsEndpoint(OrganizationReplayEndpoint): } @extend_schema( - operation_id="Retrieve a Replay Instance", + operation_id="getOrganizationReplay", + summary="Retrieve a Replay Instance", parameters=[GlobalParams.ORG_ID_OR_SLUG, ReplayParams.REPLAY_ID, ReplayValidator], responses={ 200: inline_sentry_response_serializer("GetReplay", GetReplayResponse), diff --git a/src/sentry/replays/endpoints/organization_replay_index.py b/src/sentry/replays/endpoints/organization_replay_index.py index b8d3e1996ba9..d98666bd0ed2 100644 --- a/src/sentry/replays/endpoints/organization_replay_index.py +++ b/src/sentry/replays/endpoints/organization_replay_index.py @@ -33,7 +33,8 @@ class OrganizationReplayIndexEndpoint(OrganizationReplayEndpoint): } @extend_schema( - operation_id="List an Organization's Replays", + operation_id="listOrganizationReplays", + summary="List an Organization's Replays", parameters=[GlobalParams.ORG_ID_OR_SLUG, ReplayValidator], responses={ 200: inline_sentry_response_serializer("ListReplays", list[ReplayDetailsResponse]), diff --git a/src/sentry/replays/endpoints/organization_replay_selector_index.py b/src/sentry/replays/endpoints/organization_replay_selector_index.py index 5ca5c2d3ee70..f60f80cb2573 100644 --- a/src/sentry/replays/endpoints/organization_replay_selector_index.py +++ b/src/sentry/replays/endpoints/organization_replay_selector_index.py @@ -92,7 +92,8 @@ def get_replay_filter_params(self, request, organization): @handled_snuba_exceptions @extend_schema( - operation_id="List an Organization's Selectors", + operation_id="listOrganizationReplaySelectors", + summary="List an Organization's Selectors", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.ENVIRONMENT, diff --git a/src/sentry/replays/endpoints/project_replay_clicks_index.py b/src/sentry/replays/endpoints/project_replay_clicks_index.py index 8c78a970101b..7e6756da5410 100644 --- a/src/sentry/replays/endpoints/project_replay_clicks_index.py +++ b/src/sentry/replays/endpoints/project_replay_clicks_index.py @@ -62,7 +62,8 @@ class ProjectReplayClicksIndexEndpoint(ProjectReplayEndpoint): } @extend_schema( - operation_id="List Clicked Nodes", + operation_id="listProjectReplayClicks", + summary="List Clicked Nodes", parameters=[ CursorQueryParam, GlobalParams.ORG_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/project_replay_details.py b/src/sentry/replays/endpoints/project_replay_details.py index 885f47b03f6b..3b7c471976af 100644 --- a/src/sentry/replays/endpoints/project_replay_details.py +++ b/src/sentry/replays/endpoints/project_replay_details.py @@ -67,7 +67,8 @@ def get(self, request: Request, project: Project, replay_id: str) -> Response: return Response({"data": replay_data[0]}, status=200) @extend_schema( - operation_id="Delete a Replay Instance", + operation_id="deleteProjectReplay", + summary="Delete a Replay Instance", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/project_replay_jobs_delete.py b/src/sentry/replays/endpoints/project_replay_jobs_delete.py index 1750ba27fe6a..230222b81911 100644 --- a/src/sentry/replays/endpoints/project_replay_jobs_delete.py +++ b/src/sentry/replays/endpoints/project_replay_jobs_delete.py @@ -97,7 +97,8 @@ class ProjectReplayDeletionJobsIndexEndpoint(ProjectEndpoint): permission_classes = (ReplayDeletionJobPermission,) @extend_schema( - operation_id="List Replay Batch-Deletion Jobs", + operation_id="listProjectReplaysJobsDelete", + summary="List Replay Batch-Deletion Jobs", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, @@ -132,7 +133,8 @@ def get(self, request: Request, project) -> Response[ReplayDeletionJobListRespon ) @extend_schema( - operation_id="Create Replay Batch Deletion Job", + operation_id="createProjectReplaysJobsDelete", + summary="Create Replay Batch Deletion Job", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, @@ -203,7 +205,8 @@ class ProjectReplayDeletionJobDetailEndpoint(ProjectReplayEndpoint): permission_classes = (ReplayDeletionJobPermission,) @extend_schema( - operation_id="Retrieve a Replay Batch-Deletion Job", + operation_id="getProjectReplaysJobsDelete", + summary="Retrieve a Replay Batch-Deletion Job", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/project_replay_recording_segment_details.py b/src/sentry/replays/endpoints/project_replay_recording_segment_details.py index 418dbdd0c73f..e4e90b7a73e0 100644 --- a/src/sentry/replays/endpoints/project_replay_recording_segment_details.py +++ b/src/sentry/replays/endpoints/project_replay_recording_segment_details.py @@ -26,7 +26,8 @@ class ProjectReplayRecordingSegmentDetailsEndpoint(ProjectReplayEndpoint): } @extend_schema( - operation_id="Retrieve a Recording Segment", + operation_id="getProjectReplayRecordingSegment", + summary="Retrieve a Recording Segment", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/project_replay_recording_segment_index.py b/src/sentry/replays/endpoints/project_replay_recording_segment_index.py index edfbec3111b5..0806be93bfc0 100644 --- a/src/sentry/replays/endpoints/project_replay_recording_segment_index.py +++ b/src/sentry/replays/endpoints/project_replay_recording_segment_index.py @@ -30,7 +30,8 @@ def __init__(self, **options) -> None: super().__init__(**options) @extend_schema( - operation_id="List Recording Segments", + operation_id="listProjectReplayRecordingSegments", + summary="List Recording Segments", parameters=[ CursorQueryParam, GlobalParams.ORG_ID_OR_SLUG, diff --git a/src/sentry/replays/endpoints/project_replay_viewed_by.py b/src/sentry/replays/endpoints/project_replay_viewed_by.py index f98e8a0d53eb..0804616c0811 100644 --- a/src/sentry/replays/endpoints/project_replay_viewed_by.py +++ b/src/sentry/replays/endpoints/project_replay_viewed_by.py @@ -37,7 +37,8 @@ class ProjectReplayViewedByEndpoint(ProjectReplayEndpoint): permission_classes = (ProjectEventPermission,) @extend_schema( - operation_id="List Users Who Have Viewed a Replay", + operation_id="listProjectReplayViewedBy", + summary="List Users Who Have Viewed a Replay", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, From dfb80753d79132b9ebf1575da27be4e0833dbbb8 Mon Sep 17 00:00:00 2001 From: betegon Date: Wed, 10 Jun 2026 12:01:41 +0200 Subject: [PATCH 2/2] ref(api): clearer operationIds for replay deletion jobs The /replays/jobs/delete/ path produced awkward structural names (createProjectReplaysJobsDelete reads like a delete). Use the endpoint's own domain term (ReplayDeletionJobListResponse) for clearer tokens: list/create/getProjectReplayDeletionJob(s). Summaries unchanged. --- src/sentry/replays/endpoints/project_replay_jobs_delete.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sentry/replays/endpoints/project_replay_jobs_delete.py b/src/sentry/replays/endpoints/project_replay_jobs_delete.py index 230222b81911..cb9a7442da12 100644 --- a/src/sentry/replays/endpoints/project_replay_jobs_delete.py +++ b/src/sentry/replays/endpoints/project_replay_jobs_delete.py @@ -97,7 +97,7 @@ class ProjectReplayDeletionJobsIndexEndpoint(ProjectEndpoint): permission_classes = (ReplayDeletionJobPermission,) @extend_schema( - operation_id="listProjectReplaysJobsDelete", + operation_id="listProjectReplayDeletionJobs", summary="List Replay Batch-Deletion Jobs", parameters=[ GlobalParams.ORG_ID_OR_SLUG, @@ -133,7 +133,7 @@ def get(self, request: Request, project) -> Response[ReplayDeletionJobListRespon ) @extend_schema( - operation_id="createProjectReplaysJobsDelete", + operation_id="createProjectReplayDeletionJob", summary="Create Replay Batch Deletion Job", parameters=[ GlobalParams.ORG_ID_OR_SLUG, @@ -205,7 +205,7 @@ class ProjectReplayDeletionJobDetailEndpoint(ProjectReplayEndpoint): permission_classes = (ReplayDeletionJobPermission,) @extend_schema( - operation_id="getProjectReplaysJobsDelete", + operation_id="getProjectReplayDeletionJob", summary="Retrieve a Replay Batch-Deletion Job", parameters=[ GlobalParams.ORG_ID_OR_SLUG,