Socket
Socket
Sign inDemoInstall

swagger2openapi

Package Overview
Dependencies
9
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.9.3 to 2.9.4

2

package.json
{
"name": "swagger2openapi",
"version": "2.9.3",
"version": "2.9.4",
"description": "Convert Swagger 2.0 definitions to OpenApi 3.0 and validate",

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

@@ -185,3 +185,10 @@ // @ts-check

function checkLink(link, options) {
function checkLink(link, openapi, options) {
if (typeof link.$ref !== 'undefined') {
let ref = link.$ref;
should(link.$ref).be.type('string');
if (options.lint) options.linter('reference',link,'$ref',options);
link = jptr.jptr(openapi, ref);
should(link).not.be.exactly(false, 'Cannot resolve reference: ' + ref);
}
should(link).be.type('object');

@@ -289,3 +296,3 @@ if (typeof link.operationRef !== 'undefined') {

contextAppend(options, l);
checkLink(response.links[l], options);
checkLink(response.links[l], openapi, options);
options.context.pop();

@@ -797,3 +804,3 @@ }

if (!link.$ref) {
checkLink(link, options);
checkLink(link, openapi, options);
}

@@ -800,0 +807,0 @@ options.context.pop();

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc