Open dtinth opened 10 months ago
I also have this problem
this patch will fix it:
diff --git a/dist/index.mjs b/dist/index.mjs
index 10f8a7ca51e5ba7cf3e042e7a51a4140d3aae0d5..7b82200f3b393dbe3f27e84252fdc66875617c8a 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -577,7 +577,7 @@ var swagger = async ({
version: "0.0.0",
...documentation.info
};
- const relativePath = path2.startsWith("/") ? path2.slice(1) : path2;
+ const relativePath = path2;
const app = new Elysia({ name: "@elysiajs/swagger" });
app.get(path2, function documentation2() {
const combinedSwaggerOptions = {
The changes introduced in #59 breaks in the case where
swagger
is mounted withpath
in the subdirectory.When going to
/services/docs
, I get a blank page. This is because Scalar tries to load the data from/services/services/docs/json
.Current workaround is to manually override the
scalarConfig