-
Notifications
You must be signed in to change notification settings - Fork 623
Closed
Labels
Description
Describe the bug
Context: https://stackoverflow.com/questions/78496888/how-do-i-specify-a-date-property-using-zod-in-firebase-genkit
schema validator is missing configuration for formats: https://ajv.js.org/packages/ajv-formats.html
So any time a format is included in the schema (ex. date time) ajv throws an error:
name: 'Error', message: 'unknown format "date" ignored in schema at path "#/properties/date"',
To Reproduce
Use this schema anywhere in the path of schema validator
export const SearchCriteria = z.object({
zip: z.string(),
date: z.string().datetime({ offset: false }),
timeOfDay: z.enum(["morning", "afternoon", "evening"]).optional(),
});