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

openapi-filter

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-filter - npm Package Compare versions

Comparing version 3.2.2 to 3.2.3

1

index.js

@@ -88,2 +88,3 @@ 'use strict';

while (checkForReferences) {
checkForReferences = false;
let changesMade = false;

@@ -90,0 +91,0 @@

21

openapi-filter.js

@@ -10,7 +10,4 @@ #!/usr/bin/env node

let argv = require('yargs')
.usage('$0 <infile> [outfile]',false,(yargs) => {
yargs
.positional('infile',{ describe: 'the input file' })
.positional('outfile',{ describe: 'the output file' })
})
.usage('$0 <infile> [outfile]')
.demand(1)
.strict()

@@ -83,8 +80,10 @@ .boolean('info')

info('Input file: ' + argv.infile)
const infile = argv._[0];
const outfile = argv._[1];
info('Input file: ' + infile)
let s = fs.readFileSync(argv.infile,'utf8');
let s = fs.readFileSync(infile,'utf8');
let obj = yaml.parse(s, {maxAliasCount: argv.maxAliasCount});
let res = openapiFilter.filter(obj,argv);
if (argv.infile.indexOf('.json')>=0) {
if (infile.indexOf('.json')>=0) {
s = JSON.stringify(res,null,2);

@@ -95,6 +94,6 @@ }

}
if (argv.outfile) {
fs.writeFileSync(argv.outfile,s,'utf8');
if (outfile) {
fs.writeFileSync(outfile,s,'utf8');
info('Output file: ' + argv.outfile)
info('Output file: ' + outfile)
}

@@ -101,0 +100,0 @@ else {

{
"name": "openapi-filter",
"version": "3.2.2",
"version": "3.2.3",
"description": "Filter internal paths, operations, parameters, schemas etc from OpenAPI/Swagger definitions",

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

@@ -44,3 +44,3 @@ # openapi-filter

--servers include complete servers object with --valid [boolean]
--lineWidth, -l max line width of yaml output [number] [default: -1]
--lineWidth, -l max line width of yaml output [number] [default: 0]
--maxAliasCount maximum YAML aliases allowed [number] [default: 100]

@@ -47,0 +47,0 @@ --configFile The file & path for the filter options [path]

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