Skip to content

Test change resolution scope with absolute reference #122

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

Test change resolution scope with absolute reference #122

wants to merge 1 commit into from

Conversation

matt-allan
Copy link

Hello,

This PR adds a test for a scenario outlined in 7.2.2 of the specification.

{
    "id": "http://x.y.z/rootschema.json#",
    "schema1": {
        "id": "#foo"
    },
    "schema2": {
        "id": "otherschema.json",
        "nested": {
            "id": "#bar"
        },
        "alsonested": {
            "id": "t/inner.json#a"
        }
    },
    "schema3": {
        "id": "some://where.else/completely#"
    }
}

Subschemas at the following URI-encoded JSON Pointer [json‑pointer]s (starting from the root schema) define the following resolution scopes:

#/schema3
some://where.else/completely#

With the current test suite, it's possible to write a validator that does not check if the reference is absolute and always appends. This test should ensure that you try to resolve:

http://localhost:1234/folder/folderInteger.json

...instead of :

http://localhost:1234/http://localhost:1234/folder/folderInteger.json

@Julian Julian closed this Dec 26, 2016
@Julian Julian changed the base branch from develop to master December 26, 2016 23:50
@Julian Julian reopened this Dec 26, 2016
@epoberezkin
Copy link
Member

epoberezkin commented Feb 14, 2017

@Relequestual this is another similar one to PR #160 (yet different) that I think we should merge.

@Relequestual
Copy link
Member

Given section 7.2.2 isn't even there any more, I'll opt to close this in favour of keeping track of #160 . Thanks all the ame @yuloh =]

@epoberezkin
Copy link
Member

@Relequestual I think we should still have this test, even though the reference isn't in the spec anymore, this test should still pass - #160 is similar but not the same. But it should be in both draft-04 and in in draft-06, so this PR needs changes. @handrews, can you review this one as well when you have a moment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants