ref: Type 12 PUBLIC endpoints via local error TypedDicts and serializer typing#117252
Merged
Conversation
…er typing
Tightens 12 more PUBLIC endpoints across 9 files:
- sentry_app_details delete: new local _PublishedAppErrorResponse for
`{"detail": list[str]}` shape
- project_symbol_sources get/post/put/delete: new local
_SymbolSourceErrorResponse for `{"error": str}` envelope + _SymbolSource
TypeAlias for variable source-dict shape
- organization_projects post: new local _OrganizationProjectCreateResponse
extending OrganizationProjectResponse with `team_slug` to surface the
auto-created personal team
- organization_dashboards post: typed against existing DashboardDetailsResponse
plus a `Response[str]` arm for the raw-string error bodies retained for
backward compat
- release_deploys get + post: typed Deploy serializer with new
DeploySerializerResponse TypedDict
- notification_actions_index get + post and notification_actions_details
get + put: typed OutgoingNotificationActionSerializer with new
OutgoingNotificationActionResponse TypedDict
Validation paths route through as_validation_errors(). No body changes.
scim/teams.patch is excluded — its SCIM error envelope path passes
exception.detail through directly, which mypy can't structurally match
against an SCIMErrorResponse arm without restructuring the method.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
gricha
approved these changes
Jun 9, 2026
The OpenAPI examples in NotificationActionExamples had id/organizationId as strings and omitted integrationId/sentryAppId. The runtime serializer emits these as integers (id, organizationId) and always emits integrationId/sentryAppId as nullable integers. Aligning the examples to the actual runtime resolves the api-docs-test validator failure. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Member
Author
|
openapi diff is intentional and brings openapi spec inline with current behavior |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tightens 12 more PUBLIC endpoints across 9 files:
sentry_app_detailsdelete: new local_PublishedAppErrorResponsefor{"detail": list[str]}shapeproject_symbol_sourcesget/post/put/delete: new local_SymbolSourceErrorResponsefor{"error": str}envelope +_SymbolSourceTypeAlias for variable source-dict shapeorganization_projectspost: new local_OrganizationProjectCreateResponseextendingOrganizationProjectResponsewithteam_slugorganization_dashboardspost: typed against existingDashboardDetailsResponseplus aResponse[str]arm for raw-string error bodies retained for backward compatrelease_deploysget + post: typed Deploy serializer with newDeploySerializerResponseTypedDictnotification_actions_indexget + post andnotification_actions_detailsget + put: typedOutgoingNotificationActionSerializerwith newOutgoingNotificationActionResponseTypedDictValidation paths route through
as_validation_errors(). No body changes.scim/teams.patchis excluded — its SCIM error envelope path passesexception.detailthrough directly, which mypy can't structurally match against anSCIMErrorResponsearm without restructuring the method.