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
When a $ref refers to a local definition (for example: "$ref": "#$defs/someDef"), the _baseResolvePaths() step tries to resolve that local path, while assuming all references have been resolved (using resolvePath()). But this assumption is wrong. Because the target of that path might still have a remote source:
ArgumentError ("Invalid argument(s): Failed to get schema for path because the schema file (https://example.com/geographical-location.schema.json#) could not be found. Unable to resolve path https://example.com/geographical-location.schema.json")
But the result of that operation is not used at all. Is this simply a validation step, or can this be omitted? When removing this part, the example works fine.
The text was updated successfully, but these errors were encountered:
Hello @Dampfwalze! I think one potential workaround here in this case could be to just use the $ref directly. As far as the issue being addressed here, I can't guarantee we'll be able to get to it quickly. That being said if you want to put up a PR with a fix we'd be more than happy to review it!
When a
$ref
refers to a local definition (for example:"$ref": "#$defs/someDef"
), the_baseResolvePaths()
step tries to resolve that local path, while assuming all references have been resolved (usingresolvePath()
). But this assumption is wrong. Because the target of that path might still have a remote source:throws:
This is where the assumption is made:
json_schema/lib/src/json_schema/json_schema.dart
Lines 459 to 462 in dc39865
But the result of that operation is not used at all. Is this simply a validation step, or can this be omitted? When removing this part, the example works fine.
The text was updated successfully, but these errors were encountered: