Skip to content

non-qualified file references fail to resolve #306

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

Closed
fehguy opened this issue Oct 25, 2016 · 2 comments
Closed

non-qualified file references fail to resolve #306

fehguy opened this issue Oct 25, 2016 · 2 comments
Milestone

Comments

@fehguy
Copy link
Contributor

fehguy commented Oct 25, 2016

When prefixing a file reference with ./, references correctly. When missing, they do not

fehguy added a commit that referenced this issue Oct 25, 2016
@fehguy
Copy link
Contributor Author

fehguy commented Oct 25, 2016

Looks like this is deep in the GenericRef.java class, in computeRefFormat

@fehguy
Copy link
Contributor Author

fehguy commented Oct 25, 2016

Until this is fixed, we have a work around. It looks like in the "no good deed goes unpunished" category, we added a convenience for a 1.2-style spec, where references did not need the full anchor. So $ref: Entity would be treated as $ref: '#/definitions/Entity'. The problem then is one doesn't know the difference between a file and local references.

As a work around, we will now check references without any path segment in them and a suffix. So this:

$ref: Entity

Will still be treated as this:

$ref: '#/definitions/Entity'

But this:

$ref: Entity.yaml

Will be treated like this:

$ref: ./Entity.yaml

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

1 participant