mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2026-06-02 21:59:35 +00:00
🎉 feat: update to elysia 0.5
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@elysiajs/swagger",
|
||||
"version": "0.4.0",
|
||||
"version": "0.5.0-beta.0",
|
||||
"description": "Plugin for Elysia to auto-generate Swagger page",
|
||||
"author": {
|
||||
"name": "saltyAom",
|
||||
@@ -33,13 +33,13 @@
|
||||
"release": "npm run build && npm run test && npm publish --access public"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"elysia": ">= 0.3.0"
|
||||
"elysia": ">= 0.5.0-exp-230505.1457"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.11.7",
|
||||
"bun-types": "^0.5.7",
|
||||
"eslint": "^8.26.0",
|
||||
"elysia": "^0.4.9",
|
||||
"elysia": "^0.5.0-exp-230509.157",
|
||||
"typescript": "^5.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
+9
-3
@@ -72,7 +72,8 @@ export const swagger =
|
||||
}
|
||||
}
|
||||
)
|
||||
}).get(
|
||||
}).route(
|
||||
'GET',
|
||||
`${path}/json`,
|
||||
(content) =>
|
||||
({
|
||||
@@ -86,14 +87,19 @@ export const swagger =
|
||||
...documentation.info
|
||||
}
|
||||
},
|
||||
paths: filterPaths(content[SCHEMA], {
|
||||
paths: filterPaths(content[SCHEMA]!, {
|
||||
excludeStaticFile,
|
||||
exclude: Array.isArray(exclude) ? exclude : [exclude]
|
||||
}),
|
||||
components: {
|
||||
schemas: content[DEFS]
|
||||
}
|
||||
} satisfies OpenAPIV3.Document)
|
||||
} satisfies OpenAPIV3.Document),
|
||||
{
|
||||
config: {
|
||||
allowMeta: true
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
// This is intentional to prevent deeply nested type
|
||||
|
||||
Reference in New Issue
Block a user