Express Zod API
在几分钟之内即可通过I / O架构验证和自定义中间件启动API服务器。
已知的问题端点输出的多余属性检查
科技类
打字稿优先
模式验证-Zod 3.x
Web服务器-Express.js。
记录器-温斯顿。
Swagger-OpenAPI 3.x
安装
yarn install express-zod-api
将以下选项添加到您的tsconfig.json文件中,以使其按预期工作:
{
" compilerOptions " : {
" noImplicitAny " : true ,
" strictNullChecks " : true
}
}
基本用法
./example完整示例。 您可以克隆回购协议并运行yarn start来进行检查。
设置配置
const config : ConfigType = {
评论0
最新资源