Skip to content

fix(api-docs): correct event/replay/processing-error ID schemas#116201

Merged
cvxluo merged 1 commit into
masterfrom
cvxluo/correct-eventreplayprocessing-error-id-schemas
May 26, 2026
Merged

fix(api-docs): correct event/replay/processing-error ID schemas#116201
cvxluo merged 1 commit into
masterfrom
cvxluo/correct-eventreplayprocessing-error-id-schemas

Conversation

@cvxluo
Copy link
Copy Markdown
Contributor

@cvxluo cvxluo commented May 26, 2026

While working on #116059, I noticed that some of our API parameters are marked as UUID, when they actually accept hex id values, so are technically non-comforming. Adjust the OpenAPI spec to indicate this, and add a hint that these parameters are hex ids.

I considered using a more holistic solution by making a new OpenAPIParameter, but decided against it for now, since these cases are rather limited. If we find that we keep needing to use this form of hex parameter, we can reconsider

@cvxluo cvxluo marked this pull request as ready for review May 26, 2026 17:02
@cvxluo cvxluo requested a review from a team as a code owner May 26, 2026 17:02
@cvxluo cvxluo requested a review from a team May 26, 2026 17:02
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 26, 2026
Comment thread src/sentry/apidocs/parameters.py Outdated
type=OpenApiTypes.UUID,
description="The ID of the processing error.",
type=OpenApiTypes.STR,
pattern="^[0-9a-f]{32}$",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking nit but might be worth defining hex pattern as a constant?

@cvxluo cvxluo force-pushed the cvxluo/correct-eventreplayprocessing-error-id-schemas branch from f90af6e to 28234be Compare May 26, 2026 17:16
Sentry's event_id, replay_id, and processing_error_id are 32-char hex strings without dashes, not standard RFC 4122 UUIDs. Replace OpenApiTypes.UUID with OpenApiTypes.STR plus a pattern constraint so the published OpenAPI spec accurately describes the IDs the API actually accepts and returns.


Co-authored-by: Claude <noreply@anthropic.com>
@cvxluo cvxluo force-pushed the cvxluo/correct-eventreplayprocessing-error-id-schemas branch from 28234be to 348bc9e Compare May 26, 2026 17:17
@cvxluo cvxluo merged commit 0818156 into master May 26, 2026
61 of 62 checks passed
@cvxluo cvxluo deleted the cvxluo/correct-eventreplayprocessing-error-id-schemas branch May 26, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants