Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Issue with relative paths in refs #77

Closed
anandgorantala opened this issue May 6, 2016 · 6 comments
Closed

Issue with relative paths in refs #77

anandgorantala opened this issue May 6, 2016 · 6 comments

Comments

@anandgorantala
Copy link

Hi
I am trying to use sway for validating our swagger schema files. I'm running into an issue with using relative references for files. I created a repo to illustrate the issue, https://github.com/ianand2/sway-multi-file-error.

The issue seems to be coming from here: https://github.com/apigee-127/sway/blob/master/index.js#L191 after resolving the remotes, it is resolving the local references, but since it is using remoteResults.value instead of remoteResults.resolved, it throws a bunch of validation errors. Making that change in sway makes the validations pass. Can you please take a look and let me know, if I'm doing something wrong.

Thanks

@whitlockjc
Copy link
Member

Seems like a legit issue. I'm not sure how this was missed but I will get it sorted.

@diegode
Copy link

diegode commented Aug 9, 2016

This seems related to #96

@yktv4
Copy link

yktv4 commented Jan 24, 2017

any news on this? running into an issue where sway fails to resolve references even within a single document.

@whitlockjc
Copy link
Member

json-refs is nearing completion. When it's released, sway will be updated to reflect. Thanks for your patience.

@yktv4
Copy link

yktv4 commented Jan 24, 2017

@whitlockjc I wouldn't bother you unless @theganyo used this in https://github.com/theganyo/swagger-node-runner which kinda made it useless for request validation as it fails all the time. but I guess it's primarily his issue, not yours.

thank you for your work! really appreciate people like you who support OSS, keep it up!

@whitlockjc
Copy link
Member

This is actually working as designed. With json-refs@v3.0.0+, this accidental feature was removed. It's discussed here: whitlockjc/json-refs#100

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

No branches or pull requests

4 participants