You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the ajv-ts API is a subset of the larger zod API by design, since ajv-ts should only support what is defined in JSON schema, and not the extra stuff zod adds. However, it would be great for this library to achieve 100% compatibility with the zod API in what they do have in common. This would allow using ajv-ts as a drop-in replacement for zod for the vast ecosystem of zod packages. For example, auto-form should ideally simply work:
HI, @miguelrk I'm working on the zod compatibility API. Unfortunately, not everything can be 1-1 matched. I suppose the 1.0.0 version will satisfy Zod portability API
First of all thanks for the quick answer! That's great to hear! Looking forward to 1.0.0.. I understand not everything can be 1-1 matched (by design) since this library should adhere to the JSON schema spec first and foremost, but aligning to the zod API I think would indeed allow integrating with the zod ecosystem, right? Not sure if it will work in practice, but at least conceptually I wouldn't see why it wouldn't...
conceptually it can work, will see in practice, right? I'll close the issue now since #35 has already been created to track the progress of API compatibility.
I understand that the
ajv-ts
API is a subset of the largerzod
API by design, sinceajv-ts
should only support what is defined in JSON schema, and not the extra stuffzod
adds. However, it would be great for this library to achieve 100% compatibility with the zod API in what they do have in common. This would allow usingajv-ts
as a drop-in replacement forzod
for the vast ecosystem ofzod
packages. For example,auto-form
should ideally simply work:Expected Result:
However, this is throwing errors since the
ajv-ts
schema does not match the samezod
schema (thes.object()
has another form thanz.object()
).Would this compatibility desired? This could be a good design decision (to align 100% with
zod
) in order to benefit from its vast ecosystem.The text was updated successfully, but these errors were encountered: