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

bug: rogue semicolon after `discriminatedUnion`

jmiller14 opened this issue · comments

looks like a semicolon sneaked its way into the template string used to generate discriminatedUnion schemas here: https://github.com/astahmer/openapi-zod-client/blob/main/lib/src/openApiToZod.ts#L94

gave me some headaches with a schema that uses an array of discriminated unions, but seems difficult to notice otherwise

may get a PR up myself if I've got time but am running on a tight deadline right now