-
-
Notifications
You must be signed in to change notification settings - Fork 15
Relative URL paths as $refs #80
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
I (obviously in a minute or two) haven't looked completely carefully, but initially, those indeed don't look legit for similar reasons! It's ambiguous what you mean when writing that, whether it's relative to the path of the file itself or whether (the more likely case) that it's relative to the working directory of the process! You likely should change to use some URI scheme with proper relative path support, but I'd have to take a closer look to be sure. |
Thank you for your response! These are intended to be relative to the path of the file. I was hoping to make that behavior explicit within the |
As a follow-up: is the issue that the |
I have to remind myself what the spec says honestly, what's going on here has to do with establishing a base URL basically -- and referencing has no way of knowing what base URL you mean (even though you obviously have one in mind, a base URL of the file path to the file you're using). My recollection is that yeah the JSON Schema says
If I recall correctly from the other issue, the "hacky" way to proceed down this path regardless of whether it's allowed is, in And of course I could entirely be misremembering, so I'll leave this open anyhow to see if I've led you astray. |
Ok it looks like just fixing up the |
I am trying to replace
RefResolver
withRegistry
in pystac (stac-utils/pystac#1215) and cannot get relative paths to work. I wrote a retrieve function that should make the relative schema URIs absolute with respect to the location of the base schema, but it seems like the../..
are getting stripped off.Here is an example of the type of schemas I am working with: https://raw.githubusercontent.com/radiantearth/stac-spec/v0.8.1/collection-spec/json-schema/collection.json.
"../../catalog-spec/json-schema/catalog.json"
for instance is just"catalog-spec/json-schema/catalog.json"
within myretrieve
function.This is potentially similar to #70, but these refs are not prefixed by
file
so I think this style ofref
is supposed to be legitThe text was updated successfully, but these errors were encountered: