Skip to content
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 output.orverride.zod.datetimeOptions option #1984

Merged

Conversation

soartec-lab
Copy link
Member

Status

READY

Description

fix #1669

i wanna use to {offset: true} in datetime function like this:

zod.object({
  "id": zod.number().optional(),
  "createdAt": zod.string().datetime({"offset":true}),
})

It still works as it is now and would be a breaking change, so we've made it optional.

Related PRs

none

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

You can check by the test case i added.

@soartec-lab soartec-lab added enhancement New feature or request zod Zod related issue labels Mar 22, 2025
@soartec-lab soartec-lab added this to the 7.8.0 milestone Mar 22, 2025
@melloware melloware merged commit b4eca05 into orval-labs:master Mar 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request zod Zod related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zod: Add Configurable Option to Include { offset: true } in Zod Datetime Generation
2 participants