Skip to content

Commit cbe236e

Browse files
committed
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
1 parent c2fe3f9 commit cbe236e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

express-openapi/express-openapi.d.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ declare module "express-openapi" {
180180
collectionFormat?: string
181181
'default'?: any
182182
maximum?: number
183-
exclusiveMaximum: boolean
183+
exclusiveMaximum?: boolean
184184
minimum?: number
185185
exclusiveMinimum?: boolean
186186
maxLength?: number
@@ -197,9 +197,11 @@ declare module "express-openapi" {
197197
[index: string]: ParameterObject
198198
}
199199

200-
type Parameters = (ParameterObject|ReferenceObject)[]
200+
type Parameters = (ReferenceObject|Parameter)[]
201201

202-
export interface ParameterObject {
202+
type Parameter = (InBodyParameterObject|GeneralParameterObject);
203+
204+
interface ParameterObject {
203205
name: string
204206
'in': string
205207
description?: string

0 commit comments

Comments
 (0)