Skip to content
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

$ref not honoring absolute or relative paths (for files) #16

Open
VidurMalik opened this issue Mar 30, 2015 · 1 comment
Open

$ref not honoring absolute or relative paths (for files) #16

VidurMalik opened this issue Mar 30, 2015 · 1 comment

Comments

@VidurMalik
Copy link
Contributor

Example:

Directory Structure

  SCHEMA_PATH/v1/child.json
  SCHEMA_PATH/v2/child.json
  SCHEMA_PATH/v2/parent.json

If parent.json references v2/child.json, the current implementation of RefResolver::find_local_file_path will return v1/child.json instead of the expected v2/child.json.
It will also return v1/child.json even if the absolute path to v2/child.json is specified in the $ref.

@schorsch
Copy link
Member

schorsch commented Apr 1, 2015

How is your path in the schema markup? we resolve a path downwards or on the same dir from a current schema. So as far as i see not up an down.
Take a look at the specs:
https://github.com/salesking/json_schema_tools/blob/master/spec/schema_tools/ref_resolver_spec.rb#L61

or this schema:
https://github.com/fidor/fidor_schema/tree/master/schema/v1.0

=> https://github.com/fidor/fidor_schema/blob/master/schema/v1.0/transaction.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants