mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-24 00:25:10 +00:00
fix: move parameter schema keywords location
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user