-
-
Notifications
You must be signed in to change notification settings - Fork 590
"id" attribute in root schema requires unnecessary on-line access (if present) #102
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
Comments
What do your |
Ahh, actually I think I know the problem already. Let me see if I can replicate it in a test. |
Refactor RefResolver a bit to fix #102
@jenisys I think this should do it, let us know if not, and give some more details on what your |
@gazpachoking To your first question regarding the |
VERSION: jsonschema-1.3.0
If an ID attribute is present in at the root in a schema, the validator tries to retrieve the referenced ID value which causes problems in off-line mode.
AFAIK this ID attribute servers only as identifier for others. Therefore, there is no need to retrieve it (at least not for the described case).
EXAMPLE:
When I validate it (in off-line mode), I get the following error:
RefResolutionError: HTTPSConnectionPool(host='raw.github.com.', port=443): Max retries exceeded with url: /xxx/zzz/master/etc/json/my.json-schema
After removal of the
id
attribute, everything is OK.Is the ID usage wrong or does
jsonschema
have a problem?The text was updated successfully, but these errors were encountered: