python-jsonschema / python-jsonschema/referencing
$dynamicRef doesn't find $dynamicAnchor overrides in root schemas without $id
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 53
- Forks
- 27
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 8
Description
$dynamicRef doesn't find $dynamicAnchor overrides in root schemas without $id
When a root schema has no $id and uses $ref to pull in a template containing $dynamicRef, the $dynamicRef ignores any $dynamicAnchor overrides defined in the root schema's $defs. It falls back to the template's own $dynamicAnchor instead.
Filed from python-jsonschema/jsonschema#1497. The root cause is in referencing — see that issue for the minimal reproducer.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproducer referenced in python-jsonschema/jsonschema#1497 and trace the $dynamicRef and $dynamicAnchor resolution entry points in referencing. Confirm that a root schema without an $id honors overrides in its $defs, then add coverage showing that the override is selected instead of the template anchor.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100