Swagger UI
Swagger UI Middleware 提供了一个中间件和一个组件,用于将 Swagger UI 集成到 Hono 应用程序中。
ts
import { Hono } from 'hono'
import { swaggerUI } from '@hono/swagger-ui'
const app = new Hono()
// Use the middleware to serve Swagger UI at /ui
app.get('/ui', swaggerUI({ url: '/doc' }))
export default app