@stoplight/json-schema-ref-parser
Advanced tools
Comparing version
@@ -57,8 +57,19 @@ "use strict"; | ||
let { endpointUrl } = this._opts; | ||
let { href, query } = parse(url, true); | ||
let { pathname, href, query } = parse(url, true); | ||
if (pathname === "/" || pathname === null) { | ||
return url; | ||
} | ||
let mid = query.mid ? `_m${query.mid}` : ""; | ||
let [, filepath] = href.split(endpointUrl); | ||
let filepath; | ||
if (endpointUrl instanceof RegExp) { | ||
[, filepath] = pathname.split(endpointUrl); | ||
} | ||
else if (href.indexOf(endpointUrl) === 0) { | ||
filepath = href.slice(endpointUrl.length); | ||
} | ||
if (filepath) { | ||
@@ -65,0 +76,0 @@ return filepath + mid; |
{ | ||
"name": "@stoplight/json-schema-ref-parser", | ||
"version": "9.1.3-beta.2", | ||
"version": "9.1.3", | ||
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
174069
0.13%3763
0.24%0
-100%