Skip to content

Add annotation test for $dynamicRef resolving to $dynamicAnchor #861

@Anshikakalpana

Description

@Anshikakalpana

The annotation tests in core.json cover $ref resolving through $defs, verifying that annotations from the referenced schema are attributed to the referenced location.

I couldn't find an equivalent test for $dynamicRef resolving to a $dynamicAnchor, since both are part of the core 2020-12 vocabulary and appear to have the same annotation attribution behavior once the reference resolves.

I verified this using the annotation harness, which produced:

{ 'https://json-schema.org/keyword/title': [ 'Foo' ] }

Schema used:

{ "$dynamicRef": "#foo", "$defs": { "foo": { "$dynamicAnchor": "foo", "title": "Foo" } } }

Would a PR adding this test be welcome?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions