Skip to content

Commit 946616d

Browse files
committed
parse numbers in transform pipe
1 parent 5502aa8 commit 946616d

File tree

48 files changed

+138
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+138
-114
lines changed

kubb.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig(() => {
1919
pluginOas(),
2020
pluginZod({
2121
output: { path: "./zod" },
22-
coercion: true,
22+
coercion: false,
2323
}),
2424
pluginTs({
2525
output: { path: "./types" },

src/gen/zod/MVTSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
import { z } from "zod";
77

8-
export const MVTSchema = z.coerce.string();
8+
export const MVTSchema = z.string();

src/gen/zod/agencyBudgetSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import { z } from "zod";
77

88
export const agencyBudgetSchema = z.object({
9-
code: z.coerce
9+
code: z
1010
.string()
1111
.describe(
1212
"A string of variable length containing the abbreviation of the agency budget",
1313
),
14-
type: z.coerce.string().describe("The title of the budget."),
15-
sponsor: z.coerce.string().describe("The initials of the sponsoring agency"),
14+
type: z.string().describe("The title of the budget."),
15+
sponsor: z.string().describe("The initials of the sponsoring agency"),
1616
});

src/gen/zod/agencySchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import { z } from "zod";
77

88
export const agencySchema = z.object({
9-
initials: z.coerce
9+
initials: z
1010
.string()
1111
.describe(
1212
"A string of variable length containing the initials of the agency.",
1313
),
14-
name: z.coerce.string().describe("The full name of the agency."),
14+
name: z.string().describe("The full name of the agency."),
1515
});

src/gen/zod/boroughSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
import { z } from "zod";
77

88
export const boroughSchema = z.object({
9-
id: z.coerce
9+
id: z
1010
.string()
1111
.regex(/^([0-9])$/)
1212
.describe(
1313
"A single character numeric string containing the common number used to refer to the borough. Possible values are 1-5.",
1414
),
15-
title: z.coerce.string().describe("The full name of the borough."),
16-
abbr: z.coerce
15+
title: z.string().describe("The full name of the borough."),
16+
abbr: z
1717
.string()
1818
.min(2)
1919
.max(2)

src/gen/zod/capitalCommitmentSchema.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import { z } from "zod";
77

88
export const capitalCommitmentSchema = z.object({
9-
id: z.coerce
9+
id: z
1010
.string()
1111
.uuid()
1212
.describe("A uuid used to refer to the capital commitment."),
13-
type: z.coerce
13+
type: z
1414
.string()
1515
.regex(/^([A-z]{4})$/)
1616
.describe("A four character string used to refer to the commitment type."),
@@ -20,25 +20,25 @@ export const capitalCommitmentSchema = z.object({
2020
.describe(
2121
"A string used to refer to the date when the commitment is projected to be committed.",
2222
),
23-
budgetLineCode: z.coerce
23+
budgetLineCode: z
2424
.string()
2525
.describe("A string used to refer to the budget line."),
26-
budgetLineId: z.coerce
26+
budgetLineId: z
2727
.string()
2828
.describe("A string used to refer to the budget line."),
2929
sponsoringAgency: z.nullable(
30-
z.coerce
30+
z
3131
.string()
3232
.describe(
3333
"A string of variable length containing the initials of the sponsoring agency.",
3434
),
3535
),
3636
budgetType: z.nullable(
37-
z.coerce
37+
z
3838
.string()
3939
.describe("A string of variable length denoting the type of budget."),
4040
),
41-
totalValue: z.coerce
41+
totalValue: z
4242
.number()
4343
.describe(
4444
"A numeric string used to refer to the amount of total planned commitments.",

src/gen/zod/capitalCommitmentTypeSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
import { z } from "zod";
77

88
export const capitalCommitmentTypeSchema = z.object({
9-
code: z.coerce
9+
code: z
1010
.string()
1111
.min(4)
1212
.max(4)
1313
.describe(
1414
"The four character code to represent the capital commitment type",
1515
),
16-
description: z.coerce
16+
description: z
1717
.string()
1818
.describe("The description of the capital commitment type."),
1919
});

src/gen/zod/capitalProjectBudgetedGeoJsonSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { multiPolygonSchema } from "./multiPolygonSchema.ts";
99
import { z } from "zod";
1010

1111
export const capitalProjectBudgetedGeoJsonSchema = z.object({
12-
id: z.coerce
12+
id: z
1313
.string()
1414
.describe("The concatenation of the managing code and capital project id."),
1515
type: z.enum(["Feature"]),

src/gen/zod/capitalProjectBudgetedSchema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ export const capitalProjectBudgetedSchema = z
1010
.lazy(() => capitalProjectSchema)
1111
.and(
1212
z.object({
13-
commitmentsTotal: z.coerce
13+
commitmentsTotal: z
1414
.number()
1515
.describe("The sum total of commitments for the capital project"),
1616
sponsoringAgencies: z
17-
.array(z.coerce.string())
17+
.array(z.string())
1818
.describe(
1919
"An array containing string values representing the sponsoring agencies initials.",
2020
),
2121
budgetTypes: z
22-
.array(z.coerce.string())
22+
.array(z.string())
2323
.describe(
2424
"An array containing string values representing the budget types.",
2525
),

src/gen/zod/capitalProjectPageSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const capitalProjectPageSchema = z
1212
.and(
1313
z.object({
1414
capitalProjects: z.array(z.lazy(() => capitalProjectSchema)),
15-
totalProjects: z.coerce
15+
totalProjects: z
1616
.number()
1717
.int()
1818
.min(0)

0 commit comments

Comments
 (0)