-
-
Notifications
You must be signed in to change notification settings - Fork 347
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(zod): add option to setup strict mode #1303
Conversation
I don't understand why formatting doesn't work. Locally all seems ok |
I needed to update deps 😅 |
Regarding the formatting failure, a formatting error occurred in my environment as well. Perhaps the version of |
should be good this time 😅. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's nice update 👍
CI seems to have passed all checks. And, please check as I have given some opinions.
@@ -34,7 +34,11 @@ const queryParams: ZodValidationSchemaDefinitionInput = { | |||
describe('parseZodValidationSchemaDefinition', () => { | |||
describe('with `override.coerceTypes = false` (default)', () => { | |||
it('does not emit coerced zod property schemas', () => { | |||
const parseResult = parseZodValidationSchemaDefinition(queryParams); | |||
const parseResult = parseZodValidationSchemaDefinition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also updating the unit tests, but at the same time, I thought it would be a good idea to add a test that the options added this time work using the automatically generated source code of zod
in the tests
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure to understand. I added a test for the new option too. And you want to test the generated files also right? If so indeed would be great
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a good idea to continuously test that the automatically generated source code does not break when the options added this time are specified. And it's now in the tests
directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test with the option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
If all CI is successful I'll merge this.
Status
READY
Description
Zod add strict option to each object