diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/index.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts index 9f2703b..4de8e6d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,6 @@ import { logger } from "hono/logger"; import { prettyJSON } from "hono/pretty-json"; +import { swaggerUI } from "@hono/swagger-ui"; import { OpenAPIHono, createRoute } from "@hono/zod-openapi"; import { VERSION } from "./consts"; import { Bindings, Variables } from "./env"; @@ -19,6 +20,8 @@ app.get("/", (c) => c.redirect(c.env.REDIRECT_ROOT ?? "https://github.com/getchoo/teawieAPI"), ); +app.get("/swagger", swaggerUI({ url: "/doc" })); + app.doc("/doc", { openapi: "3.0.0", info: { |
