question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

References to remote files not supported?

See original GitHub issue

When 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:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
carlocaprinicommented, Oct 15, 2019

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://....).

Semantic error at paths./app.post.requestBody.content.application/json.schema.$ref
$ref paths must begin with `#/`

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>

0reactions
webroncommented, Oct 4, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found