forked from patefacio/json_schema
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hey! I love this package, and I've been playing around with it to validate JSONs and schemas.
However, I can't seem to use relative paths in refs.
json_schema/lib/src/json_schema/json_schema.dart
Lines 1963 to 1967 in dc39865
| /// Prepends inherited Uri data to the ref if necessary. | |
| Uri _translateLocalRefToFullUri(Uri ref) { | |
| // TODO: add a more advanced check to find out if the $ref is local. | |
| // Does it have a fragment? Append the base and check if it exists in the _refMap | |
| // Does it have a path? Append the base and check if it exists in the _refMap |
It turns _SimpleUri (../../../hook/lib/schema/build_output.schema.json) into _Uri (/hook/lib/schema/build_output.schema.json).
I'm probably holding it wrong. (I don't have $ids for example, and these seem to be used in resolution.) I'm trying to reproduce the behavior I get with the default JSON editor in VSCode, but that seems to work with relative paths in schemas.
Repro:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels