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