Skip to content

Commit

Permalink
fix the issue with parsing float values
Browse files Browse the repository at this point in the history
  • Loading branch information
omermecitoglu committed Jun 21, 2024
1 parent 8b103af commit 8976743
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@omer-x/next-openapi-route-handler",
"version": "0.4.1",
"version": "0.4.2",
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
"keywords": [
"next.js",
Expand Down
2 changes: 1 addition & 1 deletion src/core/zod-error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { ZodType, ZodTypeDef } from "zod";

function convertStringToNumber(input: Record<string, unknown>, keys: string[]) {
return keys.reduce((mutation, key) => {
return { ...mutation, [key]: parseInt(mutation[key] as string) } as Record<string, unknown>;
return { ...mutation, [key]: parseFloat(mutation[key] as string) } as Record<string, unknown>;
}, input);
}

Expand Down

0 comments on commit 8976743

Please sign in to comment.