Skip to content

Commit 361f416

Browse files
committed
fix: replace swagger with openapi in dependencies and update redirect path
1 parent d4ea99b commit 361f416

File tree

4 files changed

+10
-33
lines changed

4 files changed

+10
-33
lines changed

bun.lock

Lines changed: 2 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dependencies": {
3939
"@elysiajs/bearer": "1.4.2",
4040
"@elysiajs/jwt": "1.4.0",
41-
"@elysiajs/swagger": "1.3.1",
41+
"@elysiajs/openapi": "1.4.14",
4242
"arkenv": "0.9.2",
4343
"arkregex": "0.0.5",
4444
"arktype": "2.1.29",

src/app.module.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { swagger } from '@elysiajs/swagger';
1+
import { openapi } from '@elysiajs/openapi';
22
import { DrizzleQueryError } from 'drizzle-orm/errors';
33
import { Elysia, NotFoundError, ValidationError } from 'elysia';
44
import { pick } from 'radashi';
@@ -57,7 +57,7 @@ export const setupApp = () => {
5757
};
5858
})
5959
.use(
60-
swagger({
60+
openapi({
6161
documentation: {
6262
info: { title, version, description },
6363
components: {
@@ -71,11 +71,12 @@ export const setupApp = () => {
7171
},
7272
},
7373
},
74-
exclude: ['/'],
75-
swaggerOptions: {
74+
exclude: {
75+
paths: ['/'],
76+
},
77+
swagger: {
7678
persistAuthorization: true,
7779
},
78-
scalarVersion: '1.31.10',
7980
}),
8081
)
8182
.group('/api', (app) =>

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ console.info(chalk.gray('Starting Conduit'));
77

88
new Elysia()
99
.use(setupApp)
10-
.get('/', ({ redirect }) => redirect('/swagger'))
10+
.get('/', ({ redirect }) => redirect('/openapi'))
1111
.listen(env.PORT, ({ hostname, port }) => {
1212
console.info(
1313
`Conduit is up and running on ${chalk.blue(`http://${hostname}:${port}`)}`,

0 commit comments

Comments
 (0)