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

express-openapi-validator

Package Overview
Dependencies
Maintainers
1
Versions
281
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-openapi-validator - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

23

dist/framework/types.d.ts

@@ -218,11 +218,17 @@ import * as ajv from 'ajv';

export type ArraySchemaObjectType = 'array';
export type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
export interface ArraySchemaObject extends BaseSchemaObject {
type: ArraySchemaObjectType;
export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | CompositionSchemaObject;
export interface ArraySchemaObject extends BaseSchemaObject<ArraySchemaObjectType> {
items: ReferenceObject | SchemaObject;
}
export interface NonArraySchemaObject extends BaseSchemaObject {
type: NonArraySchemaObjectType;
export interface NonArraySchemaObject extends BaseSchemaObject<NonArraySchemaObjectType> {
}
interface BaseSchemaObject {
export interface CompositionSchemaObject extends BaseSchemaObject<undefined> {
allOf?: Array<ReferenceObject | SchemaObject>;
oneOf?: Array<ReferenceObject | SchemaObject>;
anyOf?: Array<ReferenceObject | SchemaObject>;
not?: ReferenceObject | SchemaObject;
discriminator?: DiscriminatorObject;
}
interface BaseSchemaObject<T> {
type?: T;
title?: string;

@@ -251,8 +257,3 @@ description?: string;

};
allOf?: Array<ReferenceObject | SchemaObject>;
oneOf?: Array<ReferenceObject | SchemaObject>;
anyOf?: Array<ReferenceObject | SchemaObject>;
not?: ReferenceObject | SchemaObject;
nullable?: boolean;
discriminator?: DiscriminatorObject;
readOnly?: boolean;

@@ -259,0 +260,0 @@ writeOnly?: boolean;

@@ -144,3 +144,3 @@ "use strict";

const type = schema.type;
const hasXOf = schema.allOf || schema.oneOf || schema.anyOf;
const hasXOf = schema['allOf'] || schema['oneOf'] || schema['anyOf'];
const properties = hasXOf

@@ -147,0 +147,0 @@ ? xOfProperties(schema)

@@ -196,3 +196,3 @@ "use strict";

const xOf = schemaObj.oneOf ? 'oneOf' : schemaObj.anyOf ? 'anyOf' : null;
if (xOf && ((_a = schemaObj === null || schemaObj === void 0 ? void 0 : schemaObj.discriminator) === null || _a === void 0 ? void 0 : _a.propertyName) && !o.discriminator) {
if (xOf && ((_a = schemaObj.discriminator) === null || _a === void 0 ? void 0 : _a.propertyName) && !o.discriminator) {
const options = schemaObj[xOf].flatMap((refObject) => {

@@ -199,0 +199,0 @@ if (refObject['$ref'] === undefined) {

{
"name": "express-openapi-validator",
"version": "5.0.0",
"version": "5.0.1",
"description": "Automatically validate API requests and responses with OpenAPI 3 and Express.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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