Skip to content

Adding test for $dynamicRef contain json pointer #730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions tests/draft2020-12/dynamicRef.json
Original file line number Diff line number Diff line change
Expand Up @@ -756,5 +756,29 @@
"valid": false
}
]
},
{
"description" : "json pointer in $dynamicRef",
"schema":{
"$schema":"https://json-schema.org/draft/2020-12/schema",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have this covered. See line 715.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although the test on 715 is a full URI with fragment; so this does ensure you are picking up the correct root when only a fragment is supplied. I would say the description is wrong, but it is not necessarily a duplicate test. That said, it feels more like one of those extended "implementation" tests (e.g. we don't have tests for syntactically borked URIs because the baseline assumption is that you are following the underlying rules for URIs, numbers etc.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thing this is a duplicate. See line 134.

"$dynamicRef" : "#/$defs/number",
"$defs" : {
"number" : {
"type" : "number"
}
}
},
"tests":[
{
"description": "number is valid",
"data" : 9,
"valid" : true
},
{
"description": "other then number is not valid",
"data": "",
"valid": false
}
]
}
]
Loading