Skip to content
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

$ref and fetching tree node from external source #720

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

desertkun
Copy link

Apparently, there were no way to fetch some part of external schema with $ref. This pull request fixes this commit.

{
    "$ref": "http://example.com/path/schema.json#/node_a/subnode_b"
}

Also, this commit allows enumSource to use $ref:

{
    "type": "string",
    "enumSource": [{
        "source": {
            "$ref": "http://example.com/path/schema.json#/items"
        },
        "value": "{{item.id}}",
        "title": "Item <{{item.id}}>"
     }],
}

@desertkun
Copy link
Author

Fixes this issue #697

@joel-dixon
Copy link

That's a great fix! Seems like there are some holes in handling $ref. Question: does your fork also handle relative $refs? I saw issue #544 which is having the same problem I'm having, but it hasn't been fixed.

@desertkun
Copy link
Author

Unfortunately, it does not. It just pulls https://example.com/schema.json if

"$ref": "https://example.com/schema.json#/subnode"

is mentioned, and then iterates over tree to return subnode. But I can agree, $ref functionality has bad support.

@coderofsalvation
Copy link

can somebody please merge this? I need this :)

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.

None yet

3 participants