Skip to content

Commit c3d9662

Browse files
Bump zod from 3.25.67 to 4.0.14 (#50)
* Bump zod from 3.25.67 to 4.0.14 Bumps [zod](https://github.com/colinhacks/zod) from 3.25.67 to 4.0.14. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v3.25.67...v4.0.14) --- updated-dependencies: - dependency-name: zod dependency-version: 4.0.14 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix version * fix error logging * build --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: jasonblanchard <jas.blanchard@gmail.com>
1 parent f1930ef commit c3d9662

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

package-lock.json

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

packages/openapi-typescript-server-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"build": "tsup src/index.ts --dts --format cjs,esm --clean"
2323
},
2424
"dependencies": {
25-
"zod": "^3.25.67"
25+
"zod": "^4.0.14"
2626
}
2727
}

packages/openapi-typescript-server-runtime/src/schema.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type Schema = z.infer<typeof bastSchema> & {
1212
};
1313

1414
const Schema: z.ZodType<Schema> = bastSchema.extend({
15-
properties: z.lazy(() => z.record(Schema).optional()),
15+
properties: z.lazy(() => z.record(z.string(), Schema).optional()),
1616
});
1717

1818
export const OpenAPISpec = z.object({
@@ -22,7 +22,9 @@ export const OpenAPISpec = z.object({
2222
version: z.string().optional(),
2323
}),
2424
paths: z.record(
25+
z.string(),
2526
z.record(
27+
z.string(),
2628
z.object({
2729
summary: z.string().optional(),
2830
description: z.string().optional(),
@@ -44,17 +46,20 @@ export const OpenAPISpec = z.object({
4446
description: z.string().optional(),
4547
required: z.boolean().optional(),
4648
content: z.record(
49+
z.string(),
4750
z.object({
4851
schema: Schema,
4952
}),
5053
),
5154
})
5255
.optional(),
5356
responses: z.record(
57+
z.string(),
5458
z.object({
5559
description: z.string().optional(),
5660
content: z
5761
.record(
62+
z.string(),
5863
z.object({
5964
schema: Schema,
6065
}),

packages/openapi-typescript-server/bin/cli/index.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ program.name("openapi-typescript-server").description("CLI to generate Open API
667667
const specPojo = import_js_yaml.default.load(specS);
668668
const validateSpecResponse = import_openapi_typescript_server_runtime.OpenAPISpec.safeParse(specPojo);
669669
if (!validateSpecResponse.success) {
670-
console.error(validateSpecResponse.error.errors);
670+
console.error(validateSpecResponse.error.issues);
671671
return;
672672
}
673673
const sourceFile = generate(

packages/openapi-typescript-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"js-yaml": "^4.1.0",
2828
"openapi-typescript-server-runtime": "0.0.7",
2929
"ts-morph": "^26.0.0",
30-
"zod": "^3.25.67"
30+
"zod": "^4.0.14"
3131
},
3232
"devDependencies": {
3333
"@types/js-yaml": "^4.0.9",

packages/openapi-typescript-server/src/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ program
3939
const validateSpecResponse = OpenAPISpec.safeParse(specPojo);
4040

4141
if (!validateSpecResponse.success) {
42-
console.error(validateSpecResponse.error.errors);
42+
console.error(validateSpecResponse.error.issues);
4343
return;
4444
}
4545

0 commit comments

Comments
 (0)