-
Notifications
You must be signed in to change notification settings - Fork 1
feat: use zod for contract validation #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use zod for contract validation #44
Conversation
|
Cool! Do you want me to make a beta release of this before making a major release? |
|
@pevisscher yes, a beta release sounds good |
|
Released as 6.1.0-beta-06c64e9b.1 |
|
@eugenpodaru are you comfortable promoting this to a new major? |
|
@pevisscher not yet, still testing, and i see that streaming is not working |
|
@pevisscher I pushed some fixes. Can you please release another beta? |
|
Released 6.1.0-beta-5844bf48.1 |
|
@pevisscher i tweaked the schema a bit more. I had to specifically add additionalProperties: true, since it seems { strict : false } does not do that anymore. Do you know why? |
|
So you're seeing a difference between ajv and zod there. For ajv we have to be default allow additionalProperties, because for union types it will otherwise strip out the complement of keys in a non deterministic way. Zod properly handles these types so the defaults from zod are used. By default zod strips any keys that are unknown. It looks like the current strictness setting on the restclient configuration doesnt do anything anymore. I will think about how to move forward with these kind of configurations. |
|
@pevisscher yeah, makes sense, i can live with that. would you push a new beta? |
|
Released 6.1.0-beta-0e48331a.1 |
|
@pevisscher I regenerated the clients with the latest therefore. could you please publish a new beta? |
|
Released 6.1.0-beta-b9ab2814.1 |
|
@pevisscher I pushed a new commit allowing custom fields for a few entities as described here https://support.mambu.com/docs/custom-fields. Let me know what you think about the approach, and if you don't have comments, could you please release another beta? Thank you! |
|
Looks fine to me to explicitly allow passthrough on these entity types, it's a trusted source anyway Released under 6.1.0-beta-b9ab2814.1 |
|
@pevisscher On npm it says that this version was published 22 days ago. Can you check if a new beta version was published? |
|
@pevisscher i have pushed a commit setting the timeout to false to align with how got behaved. Can you please release another beta? |
|
Released v6.1.0-beta-74699a30.1 |
|
@pevisscher can you please merge the PR and release it? |
|
🎉 This PR is included in version 7.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.