Closed C-ra-ZY closed 7 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 27, 2023 3:09am |
thank you for your work ! 🙏
This is an attempt to fix https://github.com/astahmer/openapi-zod-client/issues/260
Now getZodSchema would try to infer items in a required only item with sibling in the same allOf array. and eliminate extra items in required array when there is no where to inter them, just like what swagger editor does.
However, even I myself feel that this solution is too specific to cases like 'required only item' and lacks generality. It seems more like a patch than a fix from real cause of this issue. I don't expect this pull request to be accepted, I just hope it can contribute some insights to those attempting to address this issue and provide ideas for a more comprehensive solution.