From d52c4e6dd859a1e0a280a90b7ef862c9b14a76e7 Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Fri, 13 Sep 2024 12:59:58 -0700 Subject: [PATCH 1/2] chore(apidocs): Fix inconsistencies in replay docs --- src/sentry/replays/endpoints/organization_replay_count.py | 4 ++-- src/sentry/replays/endpoints/project_replay_details.py | 2 +- .../endpoints/project_replay_recording_segment_details.py | 2 +- src/sentry/replays/endpoints/project_replay_viewed_by.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sentry/replays/endpoints/organization_replay_count.py b/src/sentry/replays/endpoints/organization_replay_count.py index 521f503bed0c04..500563fda67502 100644 --- a/src/sentry/replays/endpoints/organization_replay_count.py +++ b/src/sentry/replays/endpoints/organization_replay_count.py @@ -56,7 +56,7 @@ class OrganizationReplayCountEndpoint(OrganizationEventsV2EndpointBase): @extend_schema( examples=ReplayExamples.GET_REPLAY_COUNTS, - operation_id="Return a Count of Replays", + operation_id="Retrieve a Count of Replays", parameters=[ GlobalParams.END, GlobalParams.ENVIRONMENT, @@ -73,7 +73,7 @@ class OrganizationReplayCountEndpoint(OrganizationEventsV2EndpointBase): }, ) def get(self, request: Request, organization: Organization) -> Response: - """Return a count of replays for the given issue or transaction id.""" + """Return a count of replays for the given issue or transaction ID.""" if not features.has("organizations:session-replay", organization, actor=request.user): return Response(status=404) diff --git a/src/sentry/replays/endpoints/project_replay_details.py b/src/sentry/replays/endpoints/project_replay_details.py index 07269ecd25eee4..e40b3d3fbc0e76 100644 --- a/src/sentry/replays/endpoints/project_replay_details.py +++ b/src/sentry/replays/endpoints/project_replay_details.py @@ -85,7 +85,7 @@ def get(self, request: Request, project: Project, replay_id: str) -> Response: ) def delete(self, request: Request, project: Project, replay_id: str) -> Response: """ - Delete a replay + Delete a replay. """ if not features.has( 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 3d90c05c533597..3b28790b4a0aff 100644 --- a/src/sentry/replays/endpoints/project_replay_recording_segment_details.py +++ b/src/sentry/replays/endpoints/project_replay_recording_segment_details.py @@ -32,7 +32,7 @@ class ProjectReplayRecordingSegmentDetailsEndpoint(ProjectEndpoint): } @extend_schema( - operation_id="Fetch Recording Segment", + operation_id="Retrieve a Recording Segment", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_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 29e5bafaa2095b..cf87bb900a4b50 100644 --- a/src/sentry/replays/endpoints/project_replay_viewed_by.py +++ b/src/sentry/replays/endpoints/project_replay_viewed_by.py @@ -39,7 +39,7 @@ class ProjectReplayViewedByEndpoint(ProjectEndpoint): permission_classes = (ProjectEventPermission,) @extend_schema( - operation_id="Get list of user who have viewed a replay", + operation_id="List Users Who Have Viewed a Replay", parameters=[ GlobalParams.ORG_ID_OR_SLUG, GlobalParams.PROJECT_ID_OR_SLUG, From c6cd47c9c891aefe87934e3c2e8d93445d3a2389 Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Fri, 13 Sep 2024 13:10:00 -0700 Subject: [PATCH 2/2] order + type --- src/sentry/replays/endpoints/organization_replay_count.py | 2 +- src/sentry/replays/validators.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sentry/replays/endpoints/organization_replay_count.py b/src/sentry/replays/endpoints/organization_replay_count.py index 500563fda67502..f5fadb5fece043 100644 --- a/src/sentry/replays/endpoints/organization_replay_count.py +++ b/src/sentry/replays/endpoints/organization_replay_count.py @@ -58,10 +58,10 @@ class OrganizationReplayCountEndpoint(OrganizationEventsV2EndpointBase): examples=ReplayExamples.GET_REPLAY_COUNTS, operation_id="Retrieve a Count of Replays", parameters=[ - GlobalParams.END, GlobalParams.ENVIRONMENT, GlobalParams.ORG_ID_OR_SLUG, GlobalParams.START, + GlobalParams.END, GlobalParams.STATS_PERIOD, OrganizationParams.PROJECT, VisibilityParams.QUERY, diff --git a/src/sentry/replays/validators.py b/src/sentry/replays/validators.py index d89cd80d9970df..1b441bd06c5d0b 100644 --- a/src/sentry/replays/validators.py +++ b/src/sentry/replays/validators.py @@ -106,6 +106,8 @@ class ReplaySelectorValidator(serializers.Serializer): required=False, ) project = serializers.ListField( - required=False, help_text="The ID of the projects to filter by." + required=False, + help_text="The ID of the projects to filter by.", + child=serializers.IntegerField(), ) sort = serializers.CharField(help_text="The field to sort the output by.", required=False)