🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@readme/openapi-parser

Package Overview
Dependencies
Maintainers
8
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@readme/openapi-parser - npm Package Compare versions

Comparing version
5.4.0
to
5.5.0
+4
-2
dist/index.cjs

@@ -285,4 +285,6 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;

if (_chunkLU5KN3DHcjs.isOpenAPI31.call(void 0, this.api)) {
if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length) {
this.reportError("OpenAPI 3.1 definitions must contain at least one entry in either `paths` or `webhook`.");
if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length && !Object.keys(this.api.components || {}).length) {
this.reportError(
"OpenAPI 3.1 definitions must contain at least one entry in either `paths`, `webhooks`, or `components`."
);
}

@@ -289,0 +291,0 @@ }

@@ -285,4 +285,6 @@ import {

if (isOpenAPI31(this.api)) {
if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length) {
this.reportError("OpenAPI 3.1 definitions must contain at least one entry in either `paths` or `webhook`.");
if (!Object.keys(this.api.paths || {}).length && !Object.keys(this.api.webhooks || {}).length && !Object.keys(this.api.components || {}).length) {
this.reportError(
"OpenAPI 3.1 definitions must contain at least one entry in either `paths`, `webhooks`, or `components`."
);
}

@@ -289,0 +291,0 @@ }

{
"name": "@readme/openapi-parser",
"version": "5.4.0",
"version": "5.5.0",
"description": "Swagger 2.0 and OpenAPI 3.x parser and validator for Node and browsers",

@@ -83,3 +83,3 @@ "license": "MIT",

"prettier": "@readme/standards/prettier",
"gitHead": "866765a738dd4114d6e31a0b5bb6b021d04d778f"
"gitHead": "c53ec7e61e88dd46809a517c8d8b000db8eaf93d"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display