Skip to content
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/debug_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ def download(self, debug_file_id, project: Project):
raise Http404

@extend_schema(
operation_id="List a Project's Debug Information Files",
operation_id="listProjectDebugFiles",
summary="List a Project's Debug Information Files",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/event_attachment_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ def stream_attachment():
return response

@extend_schema(
operation_id="Retrieve an Event Attachment",
operation_id="getProjectEventAttachment",
summary="Retrieve an Event Attachment",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/event_attachments.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class EventAttachmentsEndpoint(ProjectEndpoint):
}

@extend_schema(
operation_id="List an Event's Attachments",
operation_id="listProjectEventAttachments",
summary="List an Event's Attachments",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def get_features(self, organization: Organization, request: Request) -> Mapping[
return all_features

@extend_schema(
operation_id="Query Explore Events in Table Format",
operation_id="listOrganizationEvents",
summary="Query Explore Events in Table Format",
parameters=[
GlobalParams.END,
GlobalParams.ENVIRONMENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ def get_comparison_delta(self, request: Request) -> timedelta | None:
return None

@extend_schema(
operation_id="Query Explore Events in Timeseries Format",
operation_id="listOrganizationEventsTimeseries",
summary="Query Explore Events in Timeseries Format",
parameters=[
GlobalParams.END,
GlobalParams.ENVIRONMENT,
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/api/endpoints/organization_profiling_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class OrganizationProfilingFlamegraphEndpoint(OrganizationProfilingBaseEndpoint)
}

@extend_schema(
operation_id="Retrieve a Flamegraph for an Organization",
operation_id="getOrganizationProfilingFlamegraph",
summary="Retrieve a Flamegraph for an Organization",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
OrganizationParams.PROJECT,
Expand Down Expand Up @@ -213,7 +214,8 @@ class OrganizationProfilingChunksEndpoint(OrganizationProfilingBaseEndpoint):
}

@extend_schema(
operation_id="Retrieve Profile Chunks for an Organization",
operation_id="listOrganizationProfilingChunks",
summary="Retrieve Profile Chunks for an Organization",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
CHUNKS_PROJECT_PARAM,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_project_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class OrganizationProjectKeysEndpoint(OrganizationEndpoint):
)

@extend_schema(
operation_id="List an Organization's Client Keys",
operation_id="listOrganizationProjectKeys",
summary="List an Organization's Client Keys",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
CursorQueryParam,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_relay_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class OrganizationRelayUsage(OrganizationEndpoint):
permission_classes = (OrganizationPermission,)

@extend_schema(
operation_id="List an Organization's trusted Relays",
operation_id="listOrganizationRelayUsage",
summary="List an Organization's trusted Relays",
parameters=[GlobalParams.ORG_ID_OR_SLUG],
request=None,
responses={
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/api/endpoints/organization_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ def get_projects(
)

@extend_schema(
operation_id="List an Organization's Releases",
operation_id="listOrganizationReleases",
summary="List an Organization's Releases",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.ENVIRONMENT,
Expand Down Expand Up @@ -737,7 +738,8 @@ def qs_load_func(queryset, total_offset, qs_offset, limit):
)

@extend_schema(
operation_id="Create a New Release for an Organization",
operation_id="createOrganizationRelease",
summary="Create a New Release for an Organization",
parameters=[GlobalParams.ORG_ID_OR_SLUG],
request=ReleaseSerializerWithProjects,
responses={
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class OrganizationSessionsEndpoint(OrganizationEndpoint):
owner = ApiOwner.TELEMETRY_EXPERIENCE

@extend_schema(
operation_id="Retrieve Release Health Session Statistics",
operation_id="getOrganizationSessions",
summary="Retrieve Release Health Session Statistics",
parameters=[
GlobalParams.START,
GlobalParams.END,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_stats_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class OrganizationStatsSummaryEndpoint(OrganizationEndpoint):
owner = ApiOwner.DASHBOARDS

@extend_schema(
operation_id="Retrieve an Organization's Events Count by Project",
operation_id="getOrganizationStatsSummary",
summary="Retrieve an Organization's Events Count by Project",
parameters=[GlobalParams.ORG_ID_OR_SLUG, OrgStatsSummaryQueryParamsSerializer],
request=None,
responses={
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_stats_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ class OrganizationStatsEndpointV2(OrganizationEndpoint):
permission_classes = (OrganizationAndStaffPermission,)

@extend_schema(
operation_id="Retrieve Event Counts for an Organization (v2)",
operation_id="listOrganizationStatsV2",
summary="Retrieve Event Counts for an Organization (v2)",
parameters=[GlobalParams.ORG_ID_OR_SLUG, OrgStatsQueryParamsSerializer],
request=None,
responses={
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class OrganizationTagsEndpoint(OrganizationEndpoint):
owner = ApiOwner.DATA_BROWSING

@extend_schema(
operation_id="List an Organization's Tags",
operation_id="listOrganizationTags",
summary="List an Organization's Tags",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
OrganizationParams.PROJECT,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def query_trace_data(
)

@extend_schema(
operation_id="Retrieve a Trace",
operation_id="getOrganizationTrace",
summary="Retrieve a Trace",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
TRACE_ID_PATH_PARAM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ class OrganizationTraceItemAttributesEndpoint(OrganizationTraceItemAttributesEnd
}

@extend_schema(
operation_id="List Trace Item Attributes",
operation_id="listOrganizationTraceItemAttributes",
summary="List Trace Item Attributes",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.STATS_PERIOD,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/organization_trace_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ def query_meta_data(
)

@extend_schema(
operation_id="Retrieve Trace Metadata",
operation_id="getOrganizationTraceMeta",
summary="Retrieve Trace Metadata",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
TRACE_ID_PATH_PARAM,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_filter_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class ProjectFilterDetailsEndpoint(ProjectEndpoint):
}

@extend_schema(
operation_id="Update an Inbound Data Filter",
operation_id="updateProjectFilter",
summary="Update an Inbound Data Filter",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ class ProjectFiltersEndpoint(ProjectEndpoint):
}

@extend_schema(
operation_id="List a Project's Data Filters",
operation_id="listProjectFilters",
summary="List a Project's Data Filters",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_member_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ class ProjectMemberIndexEndpoint(ProjectEndpoint):
owner = ApiOwner.FOUNDATIONS

@extend_schema(
operation_id="List a Project's Organization Members",
operation_id="listProjectMembers",
summary="List a Project's Organization Members",
parameters=[GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG],
request=None,
responses={
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_profiling_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ class ProjectProfilingProfileEndpoint(ProjectProfilingBaseEndpoint):
}

@extend_schema(
operation_id="Retrieve a Profile",
operation_id="getProjectProfilingProfile",
summary="Retrieve a Profile",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class ProjectRepoEndpoint(ProjectEndpoint):
permission_classes = (ProjectPermission,)

@extend_schema(
operation_id="Link a Repository to a Project",
operation_id="linkProjectRepository",
summary="Link a Repository to a Project",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/api/endpoints/project_servicehooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def has_feature(self, request: Request, project):
return features.has("projects:servicehooks", project=project, actor=request.user)

@extend_schema(
operation_id="List a Project's Service Hooks",
operation_id="listProjectHooks",
summary="List a Project's Service Hooks",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down Expand Up @@ -89,7 +90,8 @@ def get(self, request: Request, project) -> Response[list[ServiceHookSerializerR
)

@extend_schema(
operation_id="Register a New Service Hook",
operation_id="registerProjectServiceHook",
summary="Register a New Service Hook",
parameters=[GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG],
request=ServiceHookValidator,
responses={
Expand Down
12 changes: 8 additions & 4 deletions src/sentry/api/endpoints/project_symbol_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class ProjectSymbolSourcesEndpoint(ProjectEndpoint):
}

@extend_schema(
operation_id="Retrieve a Project's Symbol Sources",
operation_id="listProjectSymbolSources",
summary="Retrieve a Project's Symbol Sources",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down Expand Up @@ -294,7 +295,8 @@ def get(
return Response(redacted)

@extend_schema(
operation_id="Delete a Symbol Source from a Project",
operation_id="deleteProjectSymbolSource",
summary="Delete a Symbol Source from a Project",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down Expand Up @@ -330,7 +332,8 @@ def delete(
return Response(data={"error": "Missing source id"}, status=404)

@extend_schema(
operation_id="Add a Symbol Source to a Project",
operation_id="addProjectSymbolSource",
summary="Add a Symbol Source to a Project",
parameters=[GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG],
request=SourceSerializer,
responses={
Expand Down Expand Up @@ -369,7 +372,8 @@ def post(self, request: Request, project: Project) -> Response[_SymbolSource] |
return Response(data=redacted_single[0], status=201)

@extend_schema(
operation_id="Update a Project's Symbol Source",
operation_id="updateProjectSymbolSource",
summary="Update a Project's Symbol Source",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/project_tagkey_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class ProjectTagKeyValuesEndpoint(ProjectEndpoint):
)

@extend_schema(
operation_id="List a Tag's Values",
operation_id="listProjectTagValues",
summary="List a Tag's Values",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ class ReleaseThresholdStatusIndexEndpoint(OrganizationReleasesBaseEndpoint):
}

@extend_schema(
operation_id="Retrieve Statuses of Release Thresholds (Alpha)",
operation_id="listOrganizationReleaseThresholdStatuses",
summary="Retrieve Statuses of Release Thresholds (Alpha)",
parameters=[GlobalParams.ORG_ID_OR_SLUG, ReleaseThresholdStatusIndexSerializer],
request=None,
responses={
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/seer_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class SeerModelsEndpoint(Endpoint):
)

@extend_schema(
operation_id="List Seer AI Models",
operation_id="listSeerModels",
summary="List Seer AI Models",
responses={
200: inline_sentry_response_serializer("SeerModelsResponse", SeerModelsResponse),
},
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/api/endpoints/source_map_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class SourceMapDebugEndpoint(ProjectEndpoint):
owner = ApiOwner.WEB_FRONTEND_SDKS

@extend_schema(
operation_id="Get Debug Information Related to Source Maps for a Given Event",
operation_id="getProjectEventSourceMapDebug",
summary="Get Debug Information Related to Source Maps for a Given Event",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
GlobalParams.PROJECT_ID_OR_SLUG,
Expand Down
14 changes: 14 additions & 0 deletions src/sentry/apidocs/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,24 @@ def custom_postprocessing_hook(result: Any, generator: Any, **kwargs: Any) -> An
# Fetch schema component references
schema_components = result["components"]["schemas"]

# The API docs derive each page's URL slug from its summary, so two public
# operations sharing a summary would collide on the same docs URL.
summaries_seen: dict[str, str] = {}

for path, endpoints in result["paths"].items():
for method_info in endpoints.values():
endpoint_name = f"'{method_info['operationId']}'"

summary = method_info.get("summary")
if summary is not None:
if summary in summaries_seen:
raise SentryApiBuildError(
f"Duplicate summary {summary!r} on endpoints {summaries_seen[summary]} "
f"and {endpoint_name}. Summaries must be unique because the API docs "
"derive each page's URL from them."
)
summaries_seen[summary] = endpoint_name

_check_tag(method_info, endpoint_name)
_check_description(
method_info,
Expand Down
6 changes: 4 additions & 2 deletions src/sentry/core/endpoints/organization_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,8 @@ class OrganizationDetailsEndpoint(OrganizationEndpoint):
}

@extend_schema(
operation_id="Retrieve an Organization",
operation_id="getOrganization",
summary="Retrieve an Organization",
parameters=[GlobalParams.ORG_ID_OR_SLUG, OrganizationParams.DETAILED],
request=None,
responses={
Expand Down Expand Up @@ -1126,7 +1127,8 @@ def get(
return self.respond(context)

@extend_schema(
operation_id="Update an Organization",
operation_id="updateOrganization",
summary="Update an Organization",
parameters=[
GlobalParams.ORG_ID_OR_SLUG,
],
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/core/endpoints/organization_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class OrganizationEnvironmentsEndpoint(OrganizationEndpoint):
}

@extend_schema(
operation_id="List an Organization's Environments",
operation_id="listOrganizationEnvironments",
summary="List an Organization's Environments",
parameters=[GlobalParams.ORG_ID_OR_SLUG, EnvironmentParams.VISIBILITY],
responses={
200: inline_sentry_response_serializer(
Expand Down
3 changes: 2 additions & 1 deletion src/sentry/core/endpoints/organization_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ class OrganizationIndexEndpoint(Endpoint):
permission_classes = (OrganizationPermission,)

@extend_schema(
operation_id="List Your Organizations",
operation_id="listOrganizations",
summary="List Your Organizations",
parameters=[
OrganizationParams.OWNER,
CursorQueryParam,
Expand Down
Loading
Loading