Skip to content

test/refRemote: anchor within remote ref #640

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

Merged
merged 1 commit into from
Feb 26, 2023
Merged
Show file tree
Hide file tree
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
19 changes: 19 additions & 0 deletions tests/draft-next/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
}
]
},
{
"description": "anchor within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/next/schema",
"$ref": "http://localhost:1234/draft-next/locationIndependentIdentifier.json#foo"
},
"tests": [
{
"description": "remote anchor valid",
"data": 1,
"valid": true
},
{
"description": "remote anchor invalid",
"data": "a",
"valid": false
}
]
},
{
"description": "ref within remote ref",
"schema": {
Expand Down
19 changes: 19 additions & 0 deletions tests/draft2019-09/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
}
]
},
{
"description": "anchor within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/2010-09/schema",
Copy link
Member

Choose a reason for hiding this comment

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

This is an incorrect URI. Any tests that try to use this schema ought to be failing due to the missing resource.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just raised PR #644 to fix this

"$ref": "http://localhost:1234/draft2019-09/locationIndependentIdentifier.json#foo"
},
"tests": [
{
"description": "remote anchor valid",
"data": 1,
"valid": true
},
{
"description": "remote anchor invalid",
"data": "a",
"valid": false
}
]
},
{
"description": "ref within remote ref",
"schema": {
Expand Down
19 changes: 19 additions & 0 deletions tests/draft2020-12/refRemote.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,25 @@
}
]
},
{
"description": "anchor within remote ref",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "http://localhost:1234/draft2020-12/locationIndependentIdentifier.json#foo"
},
"tests": [
{
"description": "remote anchor valid",
"data": 1,
"valid": true
},
{
"description": "remote anchor invalid",
"data": "a",
"valid": false
}
]
},
{
"description": "ref within remote ref",
"schema": {
Expand Down