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
Results of the investigation into #854 as follows:
jsonschema.RefResolver is currently being used in two places - models/jsonvalidationerrors.py and utils/json.py.
In utils/json.py, RefResolver is used in the function resolve_path - however, this does not appear to be used anywhere in the codebase - when commented out, all unit and behaviour tests still pass.
In models/jsonvalidationerrors.py, RefResolver is used in the functions _child_error_messages_display_string and _resolve_reference_in_schema of the AnyOneOfJsonSchemaValidationError class.
Having installed the referencing package, some changes were made to models/jsonvalidationerrors.py (see branch).
The main issue that needs to be resolved is accommodating $ref values that are URIs - see the comments in models/jsonvalidationerrors.py L191-198 in the branch linked above. As noted, this is an issue for inline codelists, but there may be other examples that have not yet been identified.
Further spike/investigation on this issue:
What would happen if we removed this functionality? What impact does it have and is there another way that can avoid using this method?
Try finding other open source projects that have dealt with this deprecation issue, closed issues on GitHub.
The text was updated successfully, but these errors were encountered:
SarahJohnsonONS
changed the title
Replacing jsonschema.RefResolver
Replacing jsonschema.RefResolver with referencing.Registry
Aug 25, 2023
Results of the investigation into #854 as follows:
jsonschema.RefResolver
is currently being used in two places -models/jsonvalidationerrors.py
andutils/json.py
.utils/json.py
,RefResolver
is used in the functionresolve_path
- however, this does not appear to be used anywhere in the codebase - when commented out, all unit and behaviour tests still pass.models/jsonvalidationerrors.py
,RefResolver
is used in the functions_child_error_messages_display_string
and_resolve_reference_in_schema
of theAnyOneOfJsonSchemaValidationError
class.referencing
package, some changes were made tomodels/jsonvalidationerrors.py
(see branch).models/jsonvalidationerrors.py
L191-198 in the branch linked above. As noted, this is an issue for inline codelists, but there may be other examples that have not yet been identified.Further spike/investigation on this issue:
The text was updated successfully, but these errors were encountered: