From bebf29431387513d470eaa7bdee45076526a04d5 Mon Sep 17 00:00:00 2001 From: Edoardo Barbieri Date: Tue, 2 May 2023 12:12:15 +0200 Subject: [PATCH] express-openapi: add `TupleSchemaObject` (closes #864) --- packages/openapi-types/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/openapi-types/index.ts b/packages/openapi-types/index.ts index 5bd58b2b..c4d608be 100644 --- a/packages/openapi-types/index.ts +++ b/packages/openapi-types/index.ts @@ -142,6 +142,7 @@ export namespace OpenAPIV3_1 { */ export type SchemaObject = | ArraySchemaObject + | TupleSchemaObject | NonArraySchemaObject | MixedSchemaObject; @@ -150,6 +151,11 @@ export namespace OpenAPIV3_1 { items: ReferenceObject | SchemaObject; } + export interface TupleSchemaObject extends BaseSchemaObject { + type: ArraySchemaObjectType; + prefixItems: (ReferenceObject | SchemaObject)[]; + } + export interface NonArraySchemaObject extends BaseSchemaObject { type?: NonArraySchemaObjectType; }