Skip to content

feat(typescript-zod): validate integer schemas - #3109

Open
louis-bompart wants to merge 1 commit into
glideapps:masterfrom
coveord:agent/typescript-zod-integers
Open

feat(typescript-zod): validate integer schemas#3109
louis-bompart wants to merge 1 commit into
glideapps:masterfrom
coveord:agent/typescript-zod-integers

Conversation

@louis-bompart

Copy link
Copy Markdown

Description

Generate integer schemas as z.number().int() so TypeScript Zod rejects decimal values for JSON Schema integer types.

Related Issue

N/A

Motivation and Context

TypeScript Zod previously rendered JSON Schema integers as unrestricted z.number() values, allowing decimals that violate the input schema.

Previous Behaviour / Output

z.number()

New Behaviour / Output

z.number().int()

How Has This Been Tested?

Compiled both CommonJS and ESM core outputs, then ran the TypeScript Zod integer schema fixture with a decimal expected-failure case:

QUICKTEST=true FIXTURE=schema-typescript-zod npm run test:fixtures -- \
  test/inputs/schema/integer-type.schema

Screenshots (if appropriate):

N/A

@louis-bompart
louis-bompart marked this pull request as ready for review August 4, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant