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 path handling problematic #52

Closed
n-alex-white opened this issue Jan 11, 2019 · 3 comments
Closed

$ref path handling problematic #52

n-alex-white opened this issue Jan 11, 2019 · 3 comments

Comments

@n-alex-white
Copy link

n-alex-white commented Jan 11, 2019

I have the following reference in my YAML file

          schema:
            $ref: '../schema/customer-address-v1.yaml#/components/schemas/Address'

But the swagger viewer thinks that this is an improper path, and it is looking for the referenced file here

  Error opening file "users/alex/sites/work/schema/customer-address-v1.yaml"

It should be looking in

users/alex/sites/work/{project}/customer/profile/schema/customer-address-v1.yaml

Other applications like swagger-cli correctly use the relative path reference in my YAML file, but swagger-viewer does not (which renders swagger viewer problematic)

This is on a Mac, in case that is significant.

I note that internally your extension uses the open source swagger-parser, and when I use that (or swagger-cli, which uses it), then there is no problem with the reference handling.

@hatakawas
Copy link

+1

@arjun-g arjun-g pinned this issue Mar 11, 2019
@arjun-g
Copy link
Owner

arjun-g commented Mar 11, 2019

Hey devs, very sorry for the delayed response. Will try to push a fix for this by this week.

@arjun-g
Copy link
Owner

arjun-g commented Mar 11, 2019

Will be tracked in #45

@arjun-g arjun-g closed this as completed Mar 11, 2019
@arjun-g arjun-g unpinned this issue Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants