Repository navigation
Fix container diagnostics for external JSON Pointer references - #1326
Merged
Merged
Conversation
This was referenced Oct 13, 2026
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.
Fixes #1325
An external
$reftodoc.yaml#/components/schemas/Itemloads the document without its fragment before selecting the target, so the #1205 fix did not suppress unknown OpenAPI root fields on this path. Mark that load as a container and give it a separate registry cache. Direct registry loads retain their own diagnostics and strict-factory rejection regardless of registry load order; target-schema and subschema keywords still reach the configured factory.Move the container annotation fallback into
Dialect.newValidator, after the error-message, nullable, and discriminator special cases. Make the container marker volatile. The new publicSchemaContext.isDocumentContainer(Schema)query allows the dialect package to inspect it.Known limitation: references within one schema still share loaded documents. If a JSON Pointer reference loads a document before a whole-document reference to it, the latter reuses the container and suppresses root diagnostics, including strict-factory rejection. Reversing that order retains normal root diagnostics. This limitation is documented; reference traversal is unchanged.
Validation:
$idand nested dialects, and special-keyword ordering.git diff --checkpasses. Final publication edits only clarify the documented limitation.