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

oas-normalize

Package Overview
Dependencies
Maintainers
9
Versions
73
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 8.1.1 to 8.1.2

2

dist/index.d.ts
import type { OpenAPI } from 'openapi-types';
import openapiParser from '@readme/openapi-parser';
import * as utils from './lib/utils';

@@ -114,2 +115,3 @@ export declare type Options = {

convertToLatest?: boolean;
parser?: openapiParser.Options;
}): Promise<any>;

@@ -116,0 +118,0 @@ /**

14

dist/index.js

@@ -204,7 +204,11 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var convertToLatest, colorizeErrors;
var convertToLatest, parserOptions;
var _this = this;
return __generator(this, function (_a) {
convertToLatest = opts.convertToLatest;
colorizeErrors = this.opts.colorizeErrors;
parserOptions = opts.parser || {};
if (!parserOptions.validate) {
parserOptions.validate = {};
}
parserOptions.validate.colorizeErrors = this.opts.colorizeErrors;
return [2 /*return*/, this.load()

@@ -233,7 +237,3 @@ .then(function (schema) { return __awaiter(_this, void 0, void 0, function () {

return [2 /*return*/, openapi_parser_1["default"]
.validate(clonedSchema, {
validate: {
colorizeErrors: colorizeErrors
}
})
.validate(clonedSchema, parserOptions)
.then(function () {

@@ -240,0 +240,0 @@ if (!convertToLatest) {

{
"name": "oas-normalize",
"version": "8.1.1",
"version": "8.1.2",
"description": "Tooling for converting, valiating, and parsing OpenAPI, Swagger, and Postman API definitions",

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

@@ -150,7 +150,13 @@ import type { OpenAPI } from 'openapi-types';

convertToLatest?: boolean;
parser?: openapiParser.Options;
} = { convertToLatest: false }
) {
const convertToLatest = opts.convertToLatest;
const colorizeErrors = this.opts.colorizeErrors;
const parserOptions = opts.parser || {};
if (!parserOptions.validate) {
parserOptions.validate = {};
}
parserOptions.validate.colorizeErrors = this.opts.colorizeErrors;
return this.load()

@@ -184,7 +190,3 @@ .then(async schema => {

return openapiParser
.validate(clonedSchema, {
validate: {
colorizeErrors,
},
})
.validate(clonedSchema, parserOptions)
.then(() => {

@@ -191,0 +193,0 @@ if (!convertToLatest) {

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