chore: resolve stale SerializerContextBuilder / ContextAction 5.0 TODOs#8402
Open
soyuka wants to merge 2 commits into
Open
chore: resolve stale SerializerContextBuilder / ContextAction 5.0 TODOs#8402soyuka wants to merge 2 commits into
soyuka wants to merge 2 commits into
Conversation
SerializerContextBuilder::createFromRequest populated uri_variables from raw request attributes, but every serialization consumer overrides it with correctly-parsed values immediately after calling it: SerializeProcessor, DeserializeProvider and Mcp\StructuredContentProcessor. No other caller reads the builder's uri_variables (PayloadArgumentResolver only reads input/resource_class; _api_normalization_context is written, never read for uri_variables).
ContextAction served a hardcoded base @context for the "Error" and "ConstraintViolationList" short names. Exceptions are resources since 3.2: "Error" and the validation resource "ConstraintViolation" now resolve through the normal resource loop. The legacy "ConstraintViolationList" context route had no producer left — responses reference /contexts/ConstraintViolation. BREAKING CHANGE: removes the public ContextAction::RESERVED_SHORT_NAMES constant and the /contexts/ConstraintViolationList route.
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.
Two verification-gated cleanups from the 4.4/5.0 audit.
refactor(serializer): drop redundanturi_variablesassignmentSerializerContextBuilder::createFromRequest()populateduri_variablesfrom raw request attributes, but every serialization consumer overrides it with correctly-parsed values immediately after calling it —SerializeProcessor,DeserializeProviderandMcp\StructuredContentProcessor. No other caller reads the builder'suri_variables(PayloadArgumentResolveronly readsinput/resource_class;_api_normalization_contextis written, never read foruri_variables).refactor(jsonld)!: resolve reserved short names through their resourcesContextActionserved a hardcoded base@contextfor theErrorandConstraintViolationListshort names. Exceptions are resources since 3.2:Errorand the validation resourceConstraintViolationnow resolve through the normal resource loop. The legacyConstraintViolationListcontext route had no producer left — responses reference/contexts/ConstraintViolation.BREAKING CHANGE: removes the public
ContextAction::RESERVED_SHORT_NAMESconstant and the/contexts/ConstraintViolationListroute.Verification
ContextTestcoverage for/contexts/Errorand/contexts/ConstraintViolationresolving through their resources.