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

Could not resolve reference when $ref relative path files. "basePath" undefined. #2746

Closed
imallan opened this issue Mar 20, 2017 · 14 comments
Closed

Comments

@imallan
Copy link

imallan commented Mar 20, 2017

After upgrading to v3, the relative path references are not working:
e.g.

#...
paths:
  /index:
    $ref: "./paths/index.yaml#/index"

will result in:
Could not resolve reference because of: Tried to resolve a relative URL, without having a basePath. path: 'paths/index.yaml' basePath: 'undefined'

@b4nst
Copy link

b4nst commented Mar 23, 2017

Up
Same problem here

@webron
Copy link
Contributor

webron commented Mar 23, 2017

Yup, we should put that in the known issues. Unfortunately, this is not going to be an immediate fix.

@LuizSimonard
Copy link

Same problem here !!

@buunguyen
Copy link
Contributor

This was fixed in swagger-js.

@okwei2000
Copy link

okwei2000 commented Jul 19, 2017

@buunguyen, How is this fixed? I'm still having this issue today? I'm talking about the editor, the ui seems to work OK.

@webron
Copy link
Contributor

webron commented Jul 19, 2017

The editor is based on the UI. If it works in the UI, it'll work in the editor. Likely you're using an old version.

@okwei2000
Copy link

okwei2000 commented Jul 19, 2017

@webron I'm actually having problem with the new version.

version 2 of the editor http://editor2.swagger.io has preferences where I can set the 'Pointer Resolution Base Path', but the new version of the editor, does not provide a preference screen.

@webron
Copy link
Contributor

webron commented Jul 19, 2017

Okay, well that's an issue with the editor, not the ui.

@adamduren
Copy link

@buunguyen Can you point to where this was fixed in swagger-js?

@marirs-km
Copy link

Is this issue fixed on editor ?

@jorgii
Copy link

jorgii commented Mar 20, 2018

This issue is still present even in the online editor.

@webron
Copy link
Contributor

webron commented Mar 20, 2018

Please file a new ticket.

@nimaamiri92
Copy link

any news?

@shockey
Copy link
Contributor

shockey commented Jan 15, 2019

This is fixed in Swagger UI - if you're having an issue with the Editor, please open an issue there, but there is one open there already for this: swagger-api/swagger-editor#1409

@swagger-api swagger-api locked as resolved and limited conversation to collaborators Jan 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests