You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue with $ref resolution after updating to the latest jsonschema version
Hi there 👋,
I hope this finds you well. I recently updated the code to the latest jsonschema version, and as part of the process, I refactored the following code:
resolver=RefResolver(file_prefix+schema_path.replace("\\", "/"), schema, store=SCHEMA_STORE)
schema_id=schema.get('$id', '')
ifschema_id:
resolver.store[schema_id] =schema# RefResolver creates a new store internally; persist it so we can use the same mappings every timeSCHEMA_STORE=resolver.storevalidator=STIXValidator(schema, resolver=resolver, format_checker=Draft202012Validator.FORMAT_CHECKER)
reacted with thumbs up emojireacted with thumbs down emojireacted with laugh emojireacted with hooray emojireacted with confused emojireacted with heart emojireacted with rocket emojireacted with eyes emoji
-
Issue with $ref resolution after updating to the latest jsonschema version
Hi there 👋,
I hope this finds you well. I recently updated the code to the latest jsonschema version, and as part of the process, I refactored the following code:
The updated code looks like:
The JSON schema is using $ref as follows:
json
Copy code
After reviewing the documentation, I couldn't find any information on how to handle the file URI in this context.
Am I missing something or doing something incorrectly? Your insights and guidance would be highly appreciated.
Thank you for your time and assistance! 🙏
Beta Was this translation helpful? Give feedback.
All reactions