fix(api): update swagger path and add scalarConfig - bump to 0.1.43

This commit is contained in:
2026-04-29 14:15:51 +08:00
parent f31ab0eda5
commit 5cd6e3aa99
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "desa-darmasaba", "name": "desa-darmasaba",
"version": "0.1.42", "version": "0.1.43",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",

View File

@@ -63,17 +63,19 @@ const Utils = new Elysia({
}); });
const ApiServer = new Elysia() const ApiServer = new Elysia()
.use(swagger({ path: "/api/docs" }))
.use(cors(corsConfig)) .use(cors(corsConfig))
.use( .use(
swagger({ swagger({
path: "/docs", path: "/api/docs",
documentation: { documentation: {
info: { info: {
title: "Desa Darmasaba API Documentation", title: "Desa Darmasaba API Documentation",
version: "1.0.0", version: "1.0.0",
}, },
}, },
scalarConfig: {
spec: { url: "/api/docs/json" },
},
}), }),
) )
.onError(({ code }) => { .onError(({ code }) => {