Closed nmcdaines closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
openapi-zod-client | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Dec 5, 2023 10:22pm |
hey, thank you for working on this ! could you add a a changeset ?
Hey @astahmer, thanks for reviewing and apologies for not including a changeset 🙏 I've amended my previous commit to include a changeset 👍
An issue was previously raised #110 whereby the
z.discriminatedUnion
caused issues in the gererated schema.It appears the issue is caused by the
z.and
type, this breaks inference when used within az.discriminatedUnion
.In order to solve this, whenever there are multiple objects defined within an
allOf
block we should instead opt to use az.union
type instead; which then allows thez.and
type to be infered correctly.