Skip to content

RefResolver's base_uri changes between 4.14.0 and 4.15.0? #995

Answered by Julian
kratsg asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! bf92aed is the commit which fixed this on draft 6 if that's what you're looking for? In the schema you're showing, the specified behavior is that your $id should be ignored there, so it doesn't affect the resolution URI. In newer drafts though it'd work.

(Note by the way also that though it probably doesn't matter, you're not passing the right type of object to referrer when constructing a RefResolver. The argument is supposed to be the referrer document, i.e. a schema -- the one you want the precise URI f"file://{variables.schemas}/{version}/" to resolve to. If you never actually use that URI and it's just used as a base URI, then yeah it doesn't matter, but just pointing out it's no…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@kratsg
Comment options

@Julian
Comment options

@kratsg
Comment options

@plondino
Comment options

@Julian
Comment options

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