From 5cd6e3aa99267e22cb9147599717735c58403866 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 29 Apr 2026 14:15:51 +0800 Subject: [PATCH] fix(api): update swagger path and add scalarConfig - bump to 0.1.43 --- package.json | 2 +- src/app/api/[[...slugs]]/route.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2e150c85..f106dab7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "desa-darmasaba", - "version": "0.1.42", + "version": "0.1.43", "private": true, "scripts": { "dev": "next dev", diff --git a/src/app/api/[[...slugs]]/route.ts b/src/app/api/[[...slugs]]/route.ts index 0fcdc1d3..3d94a57e 100644 --- a/src/app/api/[[...slugs]]/route.ts +++ b/src/app/api/[[...slugs]]/route.ts @@ -63,17 +63,19 @@ const Utils = new Elysia({ }); const ApiServer = new Elysia() - .use(swagger({ path: "/api/docs" })) .use(cors(corsConfig)) .use( swagger({ - path: "/docs", + path: "/api/docs", documentation: { info: { title: "Desa Darmasaba API Documentation", version: "1.0.0", }, }, + scalarConfig: { + spec: { url: "/api/docs/json" }, + }, }), ) .onError(({ code }) => {