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

swagger-converter

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-converter - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

22

index.js

@@ -151,3 +151,4 @@ /*

info: this.buildInfo(resourceListing),
tags: undefinedIfEmpty(tags),
//Order of tags depend on order of 'resourceListing.apis', so sort it
tags: undefinedIfEmpty(sortBy(tags, 'name')),
paths: undefinedIfEmpty(paths),

@@ -972,3 +973,3 @@ securityDefinitions: undefinedIfEmpty(securityDefinitions),

* Remove duplicates of an array
* @params collection {array}
* @param collection {array}
* @returns {array} - collection without duplicates

@@ -984,3 +985,3 @@ */

* Strip common prefix from paths
* @params paths {array}
* @param paths {array}
* @returns {array} - path with remove common part

@@ -996,1 +997,16 @@ */

}
/*
* Sort array by value of specified attribute
* @param array {array} - array to sort
* @param attr {attr} - attribute to sort by
* @returns {array} - sorted array
*/
function sortBy(array, attr) {
assert(Array.isArray(array));
return array.sort(function(a,b) {
a = a[attr];
b = b[attr];
return (a < b) ? -1 : ((a > b) ? 1 : 0);
});
}

2

package.json
{
"name": "swagger-converter",
"version": "1.4.0",
"version": "1.4.1",
"description": "Converts Swagger documents from version 1.x to version 2.0",

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

@@ -25,3 +25,3 @@ # Swagger Converter

##### convert function
`converter` accept accept following arguments:
`convert` accept accept following arguments:

@@ -28,0 +28,0 @@ * `resourceListing`(required) is Swagger 1.x entry point file.

@@ -1041,10 +1041,10 @@ {

{
"description": "Operations about store",
"name": "store"
},
{
"description": "Operations about user",
"name": "user"
},
{
"description": "Operations about store",
"name": "store"
}
]
}

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

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

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