🔢 feat: Add Support for Integer and Float JSON Schema Types (#9469)

* 🔧 fix: Extend JsonSchemaType to include 'integer' and 'float' types

* ci: tests for new integer/float types
This commit is contained in:
Danny Avila 2025-09-05 11:12:44 -04:00 committed by GitHub
parent cadfe14abe
commit 0ecafcd38e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 162 additions and 2 deletions

View file

@ -350,7 +350,7 @@ export function convertJsonSchemaToZod(
} else {
zodSchema = z.string();
}
} else if (schema.type === 'number') {
} else if (schema.type === 'number' || schema.type === 'integer' || schema.type === 'float') {
zodSchema = z.number();
} else if (schema.type === 'boolean') {
zodSchema = z.boolean();