oas-resolver
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -115,2 +115,8 @@ 'use strict'; | ||
function testProtocol(input, backup) { | ||
if (input && input.length > 2) return input; | ||
if (backup && backup.length > 2) return backup; | ||
return 'file:'; | ||
} | ||
function resolveExternal(root, pointer, options, callback) { | ||
@@ -130,3 +136,3 @@ var u = url.parse(options.source); | ||
let u2 = url.parse(pointer); | ||
let effectiveProtocol = (u2.protocol ? u2.protocol : (u.protocol ? u.protocol : 'file:')); | ||
let effectiveProtocol = testProtocol(u2.protocol, u.protocol); | ||
@@ -133,0 +139,0 @@ let target; |
{ | ||
"name": "oas-resolver", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Resolve external $refs in OpenAPI (swagger) 2.0 / 3.x definitions", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "13140367030b374cb73a7e6d8d2bce2bf46b5079" | ||
"gitHead": "4eecb5c1689726e413734c536a0bd1f93a334c02" | ||
} |
27311
519