New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-format

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-format - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

19

openapi-format.js

@@ -192,5 +192,4 @@ #!/usr/bin/env node

} else {
if(this.path[0] === 'components' && this.path[1] === 'examples' && this.path[3] === 'value') {
if (this.path[0] === 'components' && this.path[1] === 'examples' && this.path[3] === 'value') {
// debugStep = 'Generic sorting - skip nested components>examples'
// debugStep = 'Generic sorting - skip nested components>examples'
// Skip nested components>examples values

@@ -316,9 +315,11 @@ } else {

// Filter out OpenApi.tags matching the flags
if (this.parent && this.parent && this.key === 'tags' && this.parent.key === undefined && Array.isArray(node)) {
// debugFilterStep = 'Filter - tag flags'
// Deep filter array of tags
let oaTags = JSON.parse(JSON.stringify(node)); // Deep copy of the object
const oaFilteredTags = oaTags.filter(item => !filterProps.some(i => (Object.keys(item).includes(i))));
this.update(oaFilteredTags);
// Filter out OpenApi.tags & OpenApi.x-tagGroups matching the flags
if ((this?.key === 'tags' || this?.key === 'x-tagGroups') && this?.parent.key === undefined && Array.isArray(node)) {
if (filterProps.length > 0) {
// debugFilterStep = 'Filter - tag/x-tagGroup - flags'
// Deep filter array of tag/x-tagGroup
let oaTags = JSON.parse(JSON.stringify(node)); // Deep copy of the object
const oaFilteredTags = oaTags.filter(item => !filterProps.some(i => (Object.keys(item).includes(i))));
this.update(oaFilteredTags);
}
}

@@ -325,0 +326,0 @@ });

{
"name": "openapi-format",
"version": "1.4.0",
"version": "1.4.1",
"description": "Format an OpenAPI document by ordering and filtering fields.",

@@ -51,4 +51,4 @@ "keywords": [

"devDependencies": {
"mocha": "^8.4.0"
"mocha": "^9.1.2"
}
}

@@ -11,3 +11,4 @@ # openapi-format

![npm](https://img.shields.io/npm/v/openapi-format.svg) ![npm](https://img.shields.io/npm/dw/openapi-format.svg)
<a href="https://www.npmjs.com/package/openapi-format" alt="Latest Stable Version">![npm](https://img.shields.io/npm/v/openapi-format.svg)</a>
<a href="https://www.npmjs.com/package/openapi-format" alt="Total Downloads">![npm](https://img.shields.io/npm/dw/openapi-format.svg)</a>

@@ -14,0 +15,0 @@ ## Table of content

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