abitia
abitia copied to clipboard
Swagger schema validation error
That line: https://github.com/kbkk/abitia/blob/master/packages/zod-dto/src/OpenApi/zodTypeToOpenApi.ts#L30C12-L30C28
is leading the schema to have that error:
Structural error at components.schemas.LiveModel.required
should be an array of property names required within an object schema
Jump to line 2275
I have the same issue. As per the schema reference it seems like it should be an array of property names: https://json-schema.org/draft/2020-12/json-schema-validation#name-required
@kbkk, my intention is to create a PR addressing this issue as I want to use this package in combination with https://www.npmjs.com/package/openapi-diff. Would you be interested in such addition? Thanks!
Hi,
Sorry I barely have to maintain this.
You're better off using a pkg like: https://github.com/anatine/zod-plugins/tree/main/packages/zod-nestjs
Cheers