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

oas-normalize

Package Overview
Dependencies
Maintainers
10
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oas-normalize - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## <small>3.0.1 (2021-06-07)</small>
* fix: `validate` will now reject the promise on validation errors ([3a2a0da](https://github.com/readmeio/oas-normalize/commit/3a2a0da))
* docs: fixing a typo in the readme ([f538aff](https://github.com/readmeio/oas-normalize/commit/f538aff))
## 3.0.0 (2021-06-03)

@@ -2,0 +9,0 @@

31

index.js

@@ -92,22 +92,21 @@ const fetch = require('node-fetch');

await SwaggerParser.validate(schema).catch(err => {
const error = new Error(err.message.replace(/\[object Object\]/g, 'Schema'));
error.full = err;
if (err.details && err.details.length) {
return Promise.resolve({
errors: [
{
message: err.details[0].message,
path: err.details[0].path,
},
],
full: err,
});
}
return Promise.resolve({
errors: [
error.errors = [
{
message: err.details[0].message,
path: err.details[0].path,
},
];
} else {
error.errors = [
{
message: err.message.replace(/\[object Object\]/g, 'Schema'),
},
],
full: err,
});
];
}
return Promise.reject(error);
})

@@ -114,0 +113,0 @@ );

{
"name": "oas-normalize",
"version": "3.0.0",
"version": "3.0.1",
"description": "Swagger 2 or OAS 3? YAML or JSON? URL, path, string or object? Who cares! It just works.",

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

@@ -60,3 +60,3 @@ Swagger 2 or OAS 3? YAML or JSON? URL, path, string or object? Who cares! It just works.

| `.deref()` | Resolve `$ref` pointers |
| `.validate([convertToLatest?]))` | Validate the whole thing! |
| `.validate([convertToLatest?])` | Validate the whole thing! |

@@ -63,0 +63,0 @@ # Other little features

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