Swagger UI
Swagger UI 中间件 提供了一个中间件和一个组件,用于将 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