Skip to content

What is the referrer argument to RefResolver? #1044

Answered by Julian
mdavis-xyz asked this question in Q&A
Discussion options

You must be logged in to vote

This is going to change in the next version when the referencing library replaces RefResolver.

But it's the actual dictionary it sounds like in your case. In "official" JSON Schema dialects, schema documents are either mappings (dictionaries in Python) or boolean schemas, so in theory a referrer of True is "sensical". The referrer is used for fragments / anchors / JSON Pointers -- e.g. for dereferencing # or #/foo/bar -- a referrer of True would contain no anchors (it contains no properties at all of course) so it should never hit code paths that dereference an anchor within but it's indeed possible to have a schema true be the root document for a ref resolver and to uselessly write # and…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@mdavis-xyz
Comment options

@Julian
Comment options

@mdavis-xyz
Comment options

@Julian
Comment options

Answer selected by mdavis-xyz
Comment options

You must be logged in to vote
2 replies
@Julian
Comment options

@mdavis-xyz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants