mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-06 00:36:10 +00:00
🔧 fix: 1.3.0-exp.1
This commit is contained in:
10
src/utils.ts
10
src/utils.ts
@@ -160,9 +160,13 @@ export const registerSchemaPath = ({
|
||||
return x
|
||||
|
||||
case 'object':
|
||||
if (x && typeof x.fn !== 'string') return
|
||||
if (
|
||||
x &&
|
||||
typeof (x as { fn: string | Function })?.fn !== 'string'
|
||||
)
|
||||
return
|
||||
|
||||
switch (x.fn) {
|
||||
switch ((x as { fn: string | Function })?.fn) {
|
||||
case 'json':
|
||||
case 'application/json':
|
||||
return 'application/json'
|
||||
@@ -185,7 +189,7 @@ export const registerSchemaPath = ({
|
||||
}
|
||||
}
|
||||
})
|
||||
.filter((x) => !!x)
|
||||
.filter((x) => x !== undefined)
|
||||
|
||||
if (!contentType || contentType.length === 0)
|
||||
contentType = ['application/json', 'multipart/form-data', 'text/plain']
|
||||
|
||||
Reference in New Issue
Block a user