@stoplight/json-ref-resolver
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "@stoplight/json-ref-resolver", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Recursively resolve JSON pointers and remote authorities.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -227,3 +227,16 @@ "use strict"; | ||
if (jsonPointer && jsonPointer !== '#' && jsonPointer !== '#/') { | ||
targetPath = json_1.pointerToPath(jsonPointer); | ||
try { | ||
targetPath = json_1.pointerToPath(jsonPointer); | ||
} | ||
catch (_a) { | ||
resolved.errors.push({ | ||
code: 'PARSE_POINTER', | ||
message: `'${jsonPointer}' JSON pointer is invalid`, | ||
uri: this.baseUri, | ||
uriStack: this.uriStack, | ||
pointerStack: [], | ||
path: [], | ||
}); | ||
return resolved; | ||
} | ||
resolved.result = lodash_1.get(resolved.result, targetPath); | ||
@@ -230,0 +243,0 @@ } |
@@ -76,3 +76,3 @@ /// <reference types="urijs" /> | ||
} | ||
export declare type ResolverErrorCode = 'POINTER_MISSING' | 'RESOLVE_URI' | 'PARSE_URI' | 'RESOLVE_POINTER' | 'TRANSFORM_DEREFERENCED'; | ||
export declare type ResolverErrorCode = 'POINTER_MISSING' | 'RESOLVE_URI' | 'PARSE_URI' | 'RESOLVE_POINTER' | 'PARSE_POINTER' | 'TRANSFORM_DEREFERENCED'; | ||
export interface IResolveError { | ||
@@ -79,0 +79,0 @@ code: ResolverErrorCode; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
79348
883
0