Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

exegesis

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

exegesis - npm Package Compare versions

Comparing version 2.5.1 to 2.5.2

8

lib/oas3/Schema/validators.js

@@ -16,2 +16,3 @@ "use strict";

const json_schema_resolve_ref_1 = require("../../utils/json-schema-resolve-ref");
const jsonPaths = __importStar(require("../../utils/jsonPaths"));
const jsonSchema = __importStar(require("../../utils/jsonSchema"));

@@ -177,3 +178,8 @@ const mime_1 = require("../../utils/mime");

if (node.$ref) {
node.$ref = `#/properties/value/${node.$ref.slice(2)}`;
if (node.$ref.startsWith('#')) {
node.$ref = `#/properties/value/${node.$ref.slice(2)}`;
}
else {
node.$ref = jsonPaths.toUriFragment(`/properties/value/${node.$ref.slice(1)}`);
}
}

@@ -180,0 +186,0 @@ });

@@ -0,2 +1,3 @@

export declare function toUriFragment(path: string): string;
export declare function jsonPointerStartsWith(path: string, prefix: string): boolean;
export declare function jsonPointerStripPrefix(path: string, prefix: string): string;

@@ -14,2 +14,6 @@ "use strict";

}
function toUriFragment(path) {
return jsonPtr.encodeUriFragmentIdentifier(jsonPtr.decode(path));
}
exports.toUriFragment = toUriFragment;
function jsonPointerStartsWith(path, prefix) {

@@ -22,6 +26,13 @@ path = normalize(path);

function jsonPointerStripPrefix(path, prefix) {
const isUriFragment = path.startsWith('#');
path = normalize(path);
prefix = normalize(prefix);
if (path.startsWith(prefix)) {
return path.slice(prefix.length);
const answer = path.slice(prefix.length);
if (isUriFragment) {
return toUriFragment(answer);
}
else {
return answer;
}
}

@@ -28,0 +39,0 @@ else {

2

package.json
{
"name": "exegesis",
"version": "2.5.1",
"version": "2.5.2",
"description": "Parses OpenAPI documents",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc