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 is not resolved when path contains "~1" (escaped slash) #34

Closed
kroleg opened this issue Nov 20, 2019 · 3 comments
Closed

$ref is not resolved when path contains "~1" (escaped slash) #34

kroleg opened this issue Nov 20, 2019 · 3 comments

Comments

@kroleg
Copy link

kroleg commented Nov 20, 2019

As per openapi specs https://swagger.io/docs/specification/using-ref/#escape $refs can contain ~1.
Latest version of extension doesn't support "go to definition" if path contains ~1.
Here is an example repository with perfectly valid spec (redoc compiles it) and "go to definition" in vscode doesn't work there (in api.yml file): https://github.com/kroleg/openapi-ref-bug

P.S. I would like to make a PR if/when source code will become public

@ak1394
Copy link
Collaborator

ak1394 commented Nov 20, 2019

Thanks for reporting the issue and especially providing a repo with the example of the problem. This issue has been fixed and will appear in the next release, which I expect to publish in a day or two.

As well, thanks for offering to do a PR! We're on track to release the sources before the end of the month.

@ak1394 ak1394 closed this as completed Nov 20, 2019
@kroleg
Copy link
Author

kroleg commented Nov 22, 2019

@ak1394 i just realized that problem with path resolving was because of { and } and not because of ~1. I hope you figured it out already, so i am writing this just in case.

@ak1394
Copy link
Collaborator

ak1394 commented Nov 22, 2019

Yes, indeed. The issue was related to a regex which tried to take into account a flow style definitions which contain curly braces too. Thanks for taking care to write this though!

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