Skip to content

Commit

Permalink
coerce expected numeric types in validation schema
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Sep 16, 2024
1 parent ba7853c commit 915cacb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared/schemas/query-param.schema.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { z } from 'zod';

export const FetchSpecificationSchema = z.object({
pageSize: z.number().optional(),
pageNumber: z.number().optional(),
disablePagination: z.boolean().optional(),
pageSize: z.coerce.number().optional(),
pageNumber: z.coerce.number().optional(),
disablePagination: z.coerce.boolean().optional(),
fields: z.array(z.string()).optional(),
omitFields: z.array(z.string()).optional(),
include: z.array(z.string()).optional(),
Expand Down

0 comments on commit 915cacb

Please sign in to comment.