From cbe236ec27da547d72a2249f69242eb3ebe07bf4 Mon Sep 17 00:00:00 2001 From: MugeSo Date: Tue, 16 Feb 2016 18:03:17 +0900 Subject: [PATCH] express-openapi: fix definition for OpenAPI definition fix exclusiveMaximuma property is now optional fix Parameters Object is now array of union type of InBodyParameter, GeneralParameter and Reference Object --- express-openapi/express-openapi.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/express-openapi/express-openapi.d.ts b/express-openapi/express-openapi.d.ts index 4aca41421f..633407ee1e 100644 --- a/express-openapi/express-openapi.d.ts +++ b/express-openapi/express-openapi.d.ts @@ -180,7 +180,7 @@ declare module "express-openapi" { collectionFormat?: string 'default'?: any maximum?: number - exclusiveMaximum: boolean + exclusiveMaximum?: boolean minimum?: number exclusiveMinimum?: boolean maxLength?: number @@ -197,9 +197,11 @@ declare module "express-openapi" { [index: string]: ParameterObject } - type Parameters = (ParameterObject|ReferenceObject)[] + type Parameters = (ReferenceObject|Parameter)[] - export interface ParameterObject { + type Parameter = (InBodyParameterObject|GeneralParameterObject); + + interface ParameterObject { name: string 'in': string description?: string