From 1348638cf8d5099f835a7a2d457f429450e66ea2 Mon Sep 17 00:00:00 2001 From: hgpark Date: Fri, 22 Mar 2024 12:25:15 +0900 Subject: [PATCH] fix: move parameter schema keywords location --- src/utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index 1efa070..4ed6275 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -25,11 +25,11 @@ export const mapProperties = ( else throw new Error(`Can't find model ${schema}`) return Object.entries(schema?.properties ?? []).map(([key, value]) => { - const { type: valueType = undefined, ...rest } = value as any + const { type: valueType = undefined, description, examples, ...schemaProperties } = value as any return { // @ts-ignore - ...rest, - schema: { type: valueType }, + description, examples, + schema: { type: valueType, ...schemaProperties }, in: name, name: key, // @ts-ignore