Closed sergey-pogranichnyi closed 1 month ago
Try to use openapi v3.1, i believe by default is openapi v3, and prabably v3 don't support nullable
Try to use openapi v3.1, i believe by default is openapi v3, and prabably v3 don't support nullable
Thanks, it helped:
await register(f, {
jsonSchemas: buildJsonSchemas(models),
swaggerOptions: {
openapi: {
openapi: '3.1.0',
info: {
title: '1',
description: '2',
version: '2.0.0',
},
},
},
swaggerUiOptions: {
routePrefix: '/doc',
staticCSP: true,
},
});
.nullable() zod property doesn't work correctly.
Reproducible case:
Which produces incorrect type for the schema: