abitia icon indicating copy to clipboard operation
abitia copied to clipboard

Swagger schema validation error

Open rafakwolf opened this issue 1 year ago • 1 comments

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

image

rafakwolf avatar Aug 10 '23 14:08 rafakwolf

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!

eberhm avatar Feb 23 '24 13:02 eberhm

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

kbkk avatar Jul 25 '24 06:07 kbkk