astahmer / openapi-zod-client

Generate a zodios (typescript http client with zod validation) from an OpenAPI spec (json/yaml)

Home Page:openapi-zod-client.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oneOf generates a wrong zod definition

misl-smlz opened this issue · comments

When we create a zod client via openapi-zod-client spec/openapi.json -o src/validation.ts for the following openapi.json, it generates a wrong zod definition (const TestObject = z.union([z.unknown(), z.unknown()])).

Using oneOf in the openapi.json leads to that error.

closing since it's a duplicate of #103

probably cause of today's github issues