References to remote files not supported?
See original GitHub issueWhen I use the following fragment at http://editor.swagger.io/ I get a semantic error: $ref paths must begin with '#/'
{
"openapi":"3.0.0",
"info":{
"description":"This is a test API definition",
"version":"2017.3",
"title":"API2 test",
"termsOfService":"http://swagger.io/terms/"
},
"servers":[
{
"url":"http://test.lokalhost/myapi2/",
"description":"This environment"
}
],
"paths":{
"/myobjects":{
"$ref":"http://example.com/myobjects.swagger.json"
}
}
}
Are references to remote files no longer supported? Maybe the editor does not support them but that does not make them a semantic error?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
git pull fails "unable to resolve reference ... - Stack Overflow
Solution: Delete the reference refs/remotes/origin/some/branch which is stored in the file %repo_root%/. git/refs/remotes/origin/some/branch . Same scenario on ...
Read more >Block or unblock external content in Office documents
To help protect your security and privacy, Microsoft Office is configured by default to block external content—such as images, linked media, hyperlinks, ...
Read more >2.5 Git Basics - Working with Remotes
It is entirely possible that you can be working with a “remote” repository that is, in fact, on the same host you are....
Read more >Importing files from other projects | Looker - Google Cloud
Importing files from remote or local LookML projects is not ... all of your project's references work with the updated remote project files....
Read more >Sync with a remote Git repository (fetch, pull, update) - JetBrains
This new data is not integrated into your local files, and changes are not applied to ... remote branches into your local working...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am also still experiencing this issue both while in swagger editor and in the swagger hub and trying to use an absolute url (
https://....
).EDIT:
I was actually writing my url with the wrong format: giving for granted that the url to the remote file is correct, the same structure to the model of the file should be reproduced (I was simply copying and pasting from other answers). In my case, this did the trick.
https://<link to yaml fil>#/components/schemas/<model name>
@fredwangwang checking the original definition, the issue is not reproduced. If you are able to reproduce the issue, it may be slightly different. Please make sure you’re using the latest version of the Editor. If you’re using the latest and can reproduce it, please file a new issue following the issue template.