Update json-shema-to-zod to 2.1.0 #2464
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates
json-schema-to-zod
so that we can properly useexclusiveMinimum
and because the version we used was super old.Had one main side effect that I can tell (besides adding a bunch of whitespace):
Before,
format: date
on a string field andformat: date-time
didn't do anything as the json schema to vod package skipped it. It produced inz.string()
. Now, it producedz.string().date()
or something similar for date-time. Because we don't have any truedates
but those fields are actuallydatetime
, I changed the yaml to match the right datatype. However, now we are validating these inputs as date-time and this could break user flows that previously worked (e.g. passing epoch time as a string).