Skip to content

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.

3 participants