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 - relative references - './a.json' != 'a.json' ? #26

Open
crankydillo opened this issue Jul 29, 2016 · 2 comments
Open

$ref - relative references - './a.json' != 'a.json' ? #26

crankydillo opened this issue Jul 29, 2016 · 2 comments

Comments

@crankydillo
Copy link

I'm having the same problem as documented in this swagger issue.

It seems clear that the author wants the $ref URIs to be normalized, so I'm very hesitant to call this a bug.

Mainly, I'm curious if there is justification for this requirement. If normalization is required due to an implementation detail, couldn't the implementation just normalize the URI internally?

@huggsboson
Copy link
Member

I'm not sure why the $ref would be normalized. Maybe it was implemented to protect on $schema and $ref was collateral damage.
http://json-schema.org/latest/json-schema-core.html#rfc.section.7

@queenaqian
Copy link

I think maybe we could just use the resolved uri. The URI resolver will remove ./ for normalization when we want to ref to local directory. That will cause the schema syntax validation fail.

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

3 participants