fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #3325 from hey-api/fix/zod-v4-asterisk

fix: use namespace import for zod v4

authored by

Lubos and committed by
GitHub
a715512d 1581c11b

+64 -58
+5
.changeset/good-bees-throw.md
··· 1 + --- 2 + "@hey-api/openapi-ts": patch 3 + --- 4 + 5 + **plugin(zod)**: use namespace import for zod v4
+1 -1
packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@hey-api/transformers/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/string-with-format/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 foo: z.optional(z.array(z.union([z.string(), z.string()])))
+1 -1
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/webhooks/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zSessionUserPhoneCalloutRingingWebhookRequest = z.object({ 6 6 body: z.optional(z.object({
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 /** 6 6 * Testing multiline comments in string: First line
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/2.0.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/array-items-one-of-length-1/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBar = z.string(); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/circular/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 get quux() {
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 /** 6 6 * Model with number-only name
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/enum-null/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.nullable(z.enum(['foo', 'bar'])); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/validators/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/array-items-one-of-length-1/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBar = z.string(); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 /** 6 6 * Model with number-only name
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/enum-null/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.nullable(z.enum(['foo', 'bar'])); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/enum-resolver-permissive/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/schema-const/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 foo: z.optional(z.literal('foo')),
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-bigint-min-max/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zFoo = z.object({ 6 6 foo: z.optional(z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)))
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-circular-ref-2/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBar = z.object({ 6 6 bar: z.union([
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-circular-ref/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBar = z.object({ 6 6 get bar() {
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-dates/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-metadata/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-string-constraints-union/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zLocaleOrLanguage = z.union([ 6 6 z.string().length(5),
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-types/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators-union-merge/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zContact = z.union([ 6 6 z.object({
+1 -1
packages/openapi-ts-tests/zod/v3/__snapshots__/3.1.x/v4/validators/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod/v4'; 3 + import * as z from 'zod/v4'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 /** 6 6 * Testing multiline comments in string: First line
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/2.0.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/array-items-one-of-length-1/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBar = z.string(); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/circular/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 get quux() {
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 /** 6 6 * Model with number-only name
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/enum-null/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.nullable(z.enum(['foo', 'bar'])); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/v4/validators/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/array-items-all-of/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zArrayWithAllOfObjects = z.array(z.object({ 6 6 id: z.optional(z.int())
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/array-items-one-of-length-1/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBar = z.string(); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/default/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 /** 6 6 * Model with number-only name
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/defaults-with-ref-and-anyof/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zAudioFormat = z.enum(['pcm_16bit_44.1khz', 'pcm_16bit_24khz']); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/enum-null/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.nullable(z.enum(['foo', 'bar'])); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/enum-resolver-permissive/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.union([z.enum(['foo', 'bar']), z.string()]); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/schema-const/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 foo: z.optional(z.literal('foo')),
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/type-format-zod/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 bar: z.optional(z.int()),
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-bigint-min-max/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zFoo = z.object({ 6 6 foo: z.optional(z.coerce.bigint().gte(BigInt(0)).lte(BigInt(100)))
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-circular-ref-2/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBar = z.object({ 6 6 bar: z.union([
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-circular-ref/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBar = z.object({ 6 6 get bar() {
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-dates/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-metadata/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-string-constraints-union/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zLocaleOrLanguage = z.union([ 6 6 z.string().length(5),
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-types/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators-union-merge/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zContact = z.union([ 6 6 z.object({
+1 -1
packages/openapi-ts-tests/zod/v4/__snapshots__/3.1.x/v4/validators/zod.gen.ts
··· 1 1 // This file is auto-generated by @hey-api/openapi-ts 2 2 3 - import { z } from 'zod'; 3 + import * as z from 'zod'; 4 4 5 5 export const zBaz = z.string().regex(/foo\nbar/).readonly().default('baz'); 6 6
+1
packages/openapi-ts/src/plugins/zod/v4/plugin.ts
··· 202 202 export const handlerV4: ZodPlugin['Handler'] = ({ plugin }) => { 203 203 plugin.symbol('z', { 204 204 external: getZodModule({ plugin }), 205 + importKind: 'namespace', 205 206 meta: { 206 207 category: 'external', 207 208 resource: 'zod.z',