Repository navigation
feat(apidocs): Describe project response fields - #130019
Merged
Merged
Conversation
Add ApiDescription annotations to the project response TypedDicts in sentry.api.serializers.models.project (base, summary, with-team and detailed responses) and prune the 86 baseline entries they fix. Wording comes from the serializer code, the project flag comments and the help text on the project details endpoint's update serializer. Type highlightContext as dict[str, list[str]], the shape that HighlightContextField validates and the highlight presets return. Runtime behavior is unchanged. Left in the baseline: isPublic (a legacy model flag the code doesn't explain), seerNightshiftTweaks (untyped and undocumented), and the untyped options maps. Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 5, 2026
BYK
enabled auto-merge (squash)
November 5, 2026 11:13
Co-Authored-By: BYK <[email protected]>
BYK
approved these changes
Nov 5, 2026
This branch was successfully deployed
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.
This is the next gap-fill after #129998. It adds
ApiDescriptionannotations to the project response types insentry.api.serializers.models.projectand prunes the response-coverage baseline to match. The project module had the most baseline entries left: 91.What changes
processingIssuesis always0, andhasLogs/hasTraceMetricsare always true outside sentry.ioProject.flagscomments, for thehas*fieldsProjectDetailsEndpoint, for the settings fieldsComments are unchanged, apart from two TODOs that moved above the fields they annotate. Runtime behavior is unchanged.
Type changes
DetailedProjectResponse.highlightContext:dict[str, object]→dict[str, list[str]]. That's the shapeHighlightContextFieldvalidates on write andHighlightPreset.contextreturns as the default. In the spec,highlightContext.additionalPropertiesbecomes an array of strings on the project details GET and PUT 200 responses.Left in the baseline
ProjectSerializerResponse.isPublic: it echoes the legacyProject.publicmodel flag, and nothing in the code explains what it means today.DetailedProjectResponse.seerNightshiftTweaks: it's typedAnyand has no help text or docs.DetailedProjectResponse.optionsand_OrganizationProjectOptionalResponse.options(untyped): both are now described, but their values are mixed, so they staydict[str, object].Verification
make build-api-docsand thenpython -m sentry.apidocs.response_coverage --prune: 86 entries fixed, 0 new.tests/apidocs/test_response_coverage.pyandtests/sentry/apidocspass.highlightContextitems type, the only differences are ones already on master.The optional prod-vs-dev schema diff check is expected to fail, because descriptions change.
via @BYK.
--
View Session in Sentry