-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
jsonschema.exceptions._RefResolutionError: hypothesis-jsonschema does not fetch remote references #109
Comments
A "remote reference" is anything outside the current document, so unfortunately this is working as intended - local filesystem and remote URL both involve IO, and that's the problematic part. |
@Zac-HD Why is it problematic to read from the file system? Can you clarify? |
IO and state make managing the logic much more difficult, introduce performance issues, and make caching unsafe. I'd suggest resolving the schema into a single document before handing that to |
Ok, but you'd not be forced to use it. If you want performance, you can just create a single schema, if you want composability, you'd need |
Hey I totally understand where you're coming from @Zac-HD , but can you add a note somewhere? I just lost 2 hours before I stumbled upon this issue.
This signals that Anyway, thanks for the great library! |
My understanding is that we can refer to other local JSON schemas using
$ref
. So, I have these 2 schemas in my local file system (in the same directory)main.json
And
language.json
Now, I was trying to generate a random sample by calling
from_schema(my_schema).example()
, but I keep getting the errorand I'm not sure why.
Instead of
"./language.json#"
, I also tried"language.json#"
and other variations I've seen on the web...Does this library support this? If yes, how? If not, what alternative do you suggest?
The text was updated successfully, but these errors were encountered: