Skip to content

Commit 9d342bf

Browse files
betegonsehr-m
authored andcommitted
ref(api): use token operationIds + summary for core + api endpoints (#117337)
## Summary operationId→token migration, **batch 1 of 3** (core + api endpoints, **83 ops / 50 files**). Moves the human sentence into `summary` and sets `operation_id` to a short camelCase REST token so the generated `@sentry/api` SDK gets clean names; docs titles/slugs stay byte-identical (derived from `summary`). Most are straight CRUD (`getOrganization`, `listProjectKeys`, `updateProject`, …). Verb-corrected and ad-hoc overrides where the path couldn't express intent: - non-CRUD verbs: `addProjectTeam`, `addOrganizationMember`, `linkProjectRepository`, `registerProjectServiceHook`, `provisionOrganizationScimV2User`/`Group` - singleton GETs → `get`: `getOrganizationProfilingFlamegraph`, `getOrganizationSessions`, `getOrganizationStatsSummary`, `getProjectEventSourceMapDebug` - consistency/clarity: symbol-source detail ops singular (`delete`/`updateProjectSymbolSource`), `listOrganizationTraceItemAttributes`, `listProjectDebugFiles` ## Test plan - prek green (ruff/flake8/mypy + `@extend_schema` response-type check). - CI `api docs test` regenerates + validates the spec (`--fail-on-warn`); operations show token operationIds with the sentence preserved as `summary`. ## Related (operationId→token migration) - Convention: #117285 · Merged: replays #117166, dashboards #117297, discover #117302 - Docs SEO foundation: getsentry/sentry-docs#18322 (merged) - Batches 2 & 3 to follow (issues/integrations/releases/workflow_engine; preprod/monitors/sentry_apps/notifications/seer/feedback) ⚠️ Merge note: the schema publish job has no concurrency guard — **don't merge the 3 batches simultaneously** (caused a partial-release race last time). Space them out.
1 parent bc68652 commit 9d342bf

53 files changed

Lines changed: 257 additions & 83 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/sentry/api/endpoints/debug_files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ def download(self, debug_file_id, project: Project):
286286
raise Http404
287287

288288
@extend_schema(
289-
operation_id="List a Project's Debug Information Files",
289+
operation_id="listProjectDebugFiles",
290+
summary="List a Project's Debug Information Files",
290291
parameters=[
291292
GlobalParams.ORG_ID_OR_SLUG,
292293
GlobalParams.PROJECT_ID_OR_SLUG,

src/sentry/api/endpoints/event_attachment_details.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def stream_attachment():
9393
return response
9494

9595
@extend_schema(
96-
operation_id="Retrieve an Event Attachment",
96+
operation_id="getProjectEventAttachment",
97+
summary="Retrieve an Event Attachment",
9798
parameters=[
9899
GlobalParams.ORG_ID_OR_SLUG,
99100
GlobalParams.PROJECT_ID_OR_SLUG,

src/sentry/api/endpoints/event_attachments.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class EventAttachmentsEndpoint(ProjectEndpoint):
3939
}
4040

4141
@extend_schema(
42-
operation_id="List an Event's Attachments",
42+
operation_id="listProjectEventAttachments",
43+
summary="List an Event's Attachments",
4344
parameters=[
4445
GlobalParams.ORG_ID_OR_SLUG,
4546
GlobalParams.PROJECT_ID_OR_SLUG,

src/sentry/api/endpoints/organization_events.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ def get_features(self, organization: Organization, request: Request) -> Mapping[
155155
return all_features
156156

157157
@extend_schema(
158-
operation_id="Query Explore Events in Table Format",
158+
operation_id="listOrganizationEvents",
159+
summary="Query Explore Events in Table Format",
159160
parameters=[
160161
GlobalParams.END,
161162
GlobalParams.ENVIRONMENT,

src/sentry/api/endpoints/organization_events_timeseries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ def get_comparison_delta(self, request: Request) -> timedelta | None:
129129
return None
130130

131131
@extend_schema(
132-
operation_id="Query Explore Events in Timeseries Format",
132+
operation_id="listOrganizationEventsTimeseries",
133+
summary="Query Explore Events in Timeseries Format",
133134
parameters=[
134135
GlobalParams.END,
135136
GlobalParams.ENVIRONMENT,

src/sentry/api/endpoints/organization_profiling_profiles.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ class OrganizationProfilingFlamegraphEndpoint(OrganizationProfilingBaseEndpoint)
116116
}
117117

118118
@extend_schema(
119-
operation_id="Retrieve a Flamegraph for an Organization",
119+
operation_id="getOrganizationProfilingFlamegraph",
120+
summary="Retrieve a Flamegraph for an Organization",
120121
parameters=[
121122
GlobalParams.ORG_ID_OR_SLUG,
122123
OrganizationParams.PROJECT,
@@ -213,7 +214,8 @@ class OrganizationProfilingChunksEndpoint(OrganizationProfilingBaseEndpoint):
213214
}
214215

215216
@extend_schema(
216-
operation_id="Retrieve Profile Chunks for an Organization",
217+
operation_id="listOrganizationProfilingChunks",
218+
summary="Retrieve Profile Chunks for an Organization",
217219
parameters=[
218220
GlobalParams.ORG_ID_OR_SLUG,
219221
CHUNKS_PROJECT_PARAM,

src/sentry/api/endpoints/organization_project_keys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ class OrganizationProjectKeysEndpoint(OrganizationEndpoint):
4141
)
4242

4343
@extend_schema(
44-
operation_id="List an Organization's Client Keys",
44+
operation_id="listOrganizationProjectKeys",
45+
summary="List an Organization's Client Keys",
4546
parameters=[
4647
GlobalParams.ORG_ID_OR_SLUG,
4748
CursorQueryParam,

src/sentry/api/endpoints/organization_relay_usage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ class OrganizationRelayUsage(OrganizationEndpoint):
2929
permission_classes = (OrganizationPermission,)
3030

3131
@extend_schema(
32-
operation_id="List an Organization's trusted Relays",
32+
operation_id="listOrganizationRelayUsage",
33+
summary="List an Organization's trusted Relays",
3334
parameters=[GlobalParams.ORG_ID_OR_SLUG],
3435
request=None,
3536
responses={

src/sentry/api/endpoints/organization_releases.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ def get_projects(
364364
)
365365

366366
@extend_schema(
367-
operation_id="List an Organization's Releases",
367+
operation_id="listOrganizationReleases",
368+
summary="List an Organization's Releases",
368369
parameters=[
369370
GlobalParams.ORG_ID_OR_SLUG,
370371
OrganizationParams.PROJECT,
@@ -746,7 +747,8 @@ def qs_load_func(queryset, total_offset, qs_offset, limit):
746747
)
747748

748749
@extend_schema(
749-
operation_id="Create a New Release for an Organization",
750+
operation_id="createOrganizationRelease",
751+
summary="Create a New Release for an Organization",
750752
parameters=[GlobalParams.ORG_ID_OR_SLUG],
751753
request=ReleaseSerializerWithProjects,
752754
responses={

src/sentry/api/endpoints/organization_sessions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class OrganizationSessionsEndpoint(OrganizationEndpoint):
3939
owner = ApiOwner.TELEMETRY_EXPERIENCE
4040

4141
@extend_schema(
42-
operation_id="Retrieve Release Health Session Statistics",
42+
operation_id="getOrganizationSessions",
43+
summary="Retrieve Release Health Session Statistics",
4344
parameters=[
4445
GlobalParams.START,
4546
GlobalParams.END,

0 commit comments

Comments
 (0)