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

Referenced schemas don't seem to be using base URL? #773

Open
jstafford5380 opened this issue May 18, 2022 · 0 comments
Open

Referenced schemas don't seem to be using base URL? #773

jstafford5380 opened this issue May 18, 2022 · 0 comments

Comments

@jstafford5380
Copy link

jstafford5380 commented May 18, 2022

Summary

Schemas don't seem to follow child references relative to parent reference base uri

Relevant information

I have a as schema that has some properties referencing other schemas via $ref using a relative path. But the document I'm trying to validate is returning an error stating that schema could not be loaded and the path that it shows seems to be relative to root, not relative to the first schema. For example

  • Doc uses $schema=c:\user\me\docs\foo.schema.json
  • foo.schema.json has a property reference "$ref": "bar.schema.json"
  • Doc shows a validation error 'Problems loading reference 'file:///bar.schema.json': Unable to load schema from \bar.schema.json`: No content.

The schema files are co-located; same directory.

I'm not sure if I'm doing something wrong or if it's not supported or a bug or what

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

No branches or pull requests

1 participant