Repository navigation
Conversation
The $recursiveRef keyword was ignored, so values evaluated through it were never validated. The reference is expanded against the base uri of its schema when the schema is loaded, like $ref. During the evaluation, the schema resources entered (the root schema and each schema with an $id) are kept as the dynamic scope, shared by all nested Draft 2019-09 constraints. When the initial target declares "$recursiveAnchor": true, the outermost resource of the dynamic scope reachable through resources that declare it as well becomes the destination. unevaluatedProperties follows $recursiveRef as well when collecting the evaluated properties. Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
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.
Draft 2019-09 ignored the
$recursiveRefkeyword, so values evaluated through it were never validated.$recursiveRefis expanded against the base URI of its own schema, the same way$refis.DynamicScopekeeps track of the schema resources that have been entered: the root schema and every schema with an$id.Draft2019Constraintadds a resource when it enters one and removes it infinally. All nested Draft 2019-09 constraints share one scope throughDraft2019\Factory.Factory::resolveRecursiveRef()first resolves the target like a$ref. If that target has"$recursiveAnchor": true, it walks the dynamic scope from the innermost resource outwards and keeps going while each resource also has"$recursiveAnchor": true. The last one reached becomes the target.UnevaluatedPropertiesConstraintnow follows$recursiveReftoo when it collects the properties that have been evaluated.Related Issue
None.
Type of Change
Checklist
Additional Notes