mirror of
https://github.com/zoriya/elysia-swagger.git
synced 2025-12-06 00:36:10 +00:00
🎉 feat: user provided components
This commit is contained in:
@@ -10,18 +10,31 @@ const app = new Elysia({
|
||||
documentation: {
|
||||
info: {
|
||||
title: 'Elysia',
|
||||
version: '0.5.0'
|
||||
version: '0.6.10'
|
||||
},
|
||||
tags: [
|
||||
{
|
||||
name: 'Test',
|
||||
description: 'Hello'
|
||||
}
|
||||
]
|
||||
],
|
||||
components: {
|
||||
schemas: {
|
||||
User: {
|
||||
description: 'string'
|
||||
}
|
||||
},
|
||||
securitySchemes: {
|
||||
JwtAuth: {
|
||||
type: 'http',
|
||||
scheme: 'bearer',
|
||||
bearerFormat: 'JWT',
|
||||
description: 'Enter JWT Bearer token **_only_**'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
||||
.use(plugin)
|
||||
.listen(8080)
|
||||
|
||||
console.log(app.routes)
|
||||
Reference in New Issue
Block a user