UNPKG

koa-typescript-sequlize-swagger

Version:

nodejs的后端模板,使用了koa,typescript,koa-swagger-decorator,zod等

17 lines (15 loc) 360 B
import { z } from 'koa-swagger-decorator' import { commonResponse } from '@/controller/common' /* * 构建请求参数 * */ export const TestLogReq = z.object({ info: z.string(), warn: z.string() }) /// 响应参数 export const TestLogRes = commonResponse() /* * 请求体的type * */ export type ITestLogReq = z.infer<typeof TestLogReq>