Commit 34c1df85 authored by Jérome Perrin's avatar Jérome Perrin

delegate all external references to resolveExternalReference

not just only `urn:jio:` ones
parent 9dafc5c3
......@@ -153,19 +153,6 @@
return absolute_url;
}
function downloadJSON(url) {
return RSVP.Queue()
.push(function () {
return jIO.util.ajax({
url: url,
dataType: "json"
});
})
.push(function (evt) {
return evt.target.response;
});
}
function resolveLocalReference(schema, ref) {
// 2 here is for #/
var i, ref_path = ref.substr(2, ref.length),
......@@ -269,17 +256,10 @@
return mapped_url;
});
} else {
if (download_url.startsWith("urn:jio:")) {
queue = RSVP.Queue()
.push(function () {
return g.resolveExternalReference(download_url);
});
} else {
queue = RSVP.Queue()
.push(function () {
return downloadJSON(download_url);
});
}
queue = RSVP.Queue()
.push(function () {
return g.resolveExternalReference(download_url);
});
queue
.push(function (json) {
if (checkHardCircular(g, path, url)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment