Skip to content

Commit 8976743

Browse files
committed
fix the issue with parsing float values
1 parent 8b103af commit 8976743

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@omer-x/next-openapi-route-handler",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
55
"keywords": [
66
"next.js",

src/core/zod-error-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { ZodType, ZodTypeDef } from "zod";
33

44
function convertStringToNumber(input: Record<string, unknown>, keys: string[]) {
55
return keys.reduce((mutation, key) => {
6-
return { ...mutation, [key]: parseInt(mutation[key] as string) } as Record<string, unknown>;
6+
return { ...mutation, [key]: parseFloat(mutation[key] as string) } as Record<string, unknown>;
77
}, input);
88
}
99

0 commit comments

Comments
 (0)