Skip to content

Commit 08c9e76

Browse files
committed
fix
1 parent cc6034c commit 08c9e76

15 files changed

Lines changed: 117 additions & 5 deletions

File tree

packages/openapi-ts-tests/faker/v10/__snapshots__/3.0.x/faker-circular/@faker-js/faker.gen.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { faker, type Faker } from '@faker-js/faker';
44

5-
import type { Bar, Baz, Comment, Corge, Department, Employee, Foo, Member, Org, Project, Quux, Qux, TreeNode } from '../types.gen';
5+
import type { Bar, Baz, Comment, Corge, Department, Employee, Foo, Member, Org, Project, Quux, Qux, TreeNode, Wrapper } from '../types.gen';
66

77
export type Options = {
88
faker?: Faker;
@@ -33,6 +33,14 @@ export const fakeTreeNode = (options: Options = {}, _callDepth = 0): TreeNode =>
3333
};
3434
};
3535

36+
export const fakeWrapper = (options?: Options): Wrapper => {
37+
const f = options?.faker ?? faker;
38+
return {
39+
label: f.string.sample(),
40+
tree: fakeTreeNode(options)
41+
};
42+
};
43+
3644
export const fakeComment = (options: Options = {}, _callDepth = 0): Comment => {
3745
const f = options?.faker ?? faker;
3846
return {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
export type { Bar, Baz, ClientOptions, Comment, Corge, Department, Employee, Foo, Member, Org, Project, Quux, Qux, TreeNode } from './types.gen';
3+
export type { Bar, Baz, ClientOptions, Comment, Corge, Department, Employee, Foo, Member, Org, Project, Quux, Qux, TreeNode, Wrapper } from './types.gen';

packages/openapi-ts-tests/faker/v10/__snapshots__/3.0.x/faker-circular/types.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export type Project = {
6767
department?: Department;
6868
};
6969

70+
export type Wrapper = {
71+
label: string;
72+
tree: TreeNode;
73+
};
74+
7075
export type Comment = {
7176
id: string;
7277
text: string;

packages/openapi-ts-tests/faker/v10/__snapshots__/3.1.x/faker-circular/@faker-js/faker.gen.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { faker, type Faker } from '@faker-js/faker';
44

5-
import type { Comment, Department, Employee, Member, Org, Project, TreeNode } from '../types.gen';
5+
import type { Comment, Department, Employee, Member, Org, Pair, Project, TreeNode, Wrapper } from '../types.gen';
66

77
export type Options = {
88
faker?: Faker;
@@ -33,6 +33,18 @@ export const fakeTreeNode = (options: Options = {}, _callDepth = 0): TreeNode =>
3333
};
3434
};
3535

36+
export const fakeWrapper = (options?: Options): Wrapper => {
37+
const f = options?.faker ?? faker;
38+
return {
39+
label: f.string.sample(),
40+
tree: fakeTreeNode(options)
41+
};
42+
};
43+
44+
export const fakePair = (options?: Options): Pair => ({
45+
nodes: [fakeTreeNode(options), fakeTreeNode(options)]
46+
});
47+
3648
export const fakeComment = (options: Options = {}, _callDepth = 0): Comment => {
3749
const f = options?.faker ?? faker;
3850
return {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

3-
export type { ClientOptions, Comment, Department, Employee, Member, Org, Project, TreeNode } from './types.gen';
3+
export type { ClientOptions, Comment, Department, Employee, Member, Org, Pair, Project, TreeNode, Wrapper } from './types.gen';

packages/openapi-ts-tests/faker/v10/__snapshots__/3.1.x/faker-circular/types.gen.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ export type Project = {
4040
department?: Department;
4141
};
4242

43+
export type Wrapper = {
44+
label: string;
45+
tree: TreeNode;
46+
};
47+
48+
export type Pair = {
49+
nodes: [
50+
TreeNode,
51+
TreeNode
52+
];
53+
};
54+
4355
export type Comment = {
4456
id: string;
4557
text: string;

packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/mini/circular/zod.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export const zTreeNode = z.object({
88
children: z.optional(z.array(z.lazy((): any => zTreeNode)))
99
});
1010

11+
export const zWrapper = z.object({
12+
label: z.string(),
13+
tree: zTreeNode
14+
});
15+
1116
export const zComment = z.object({
1217
id: z.string(),
1318
text: z.string(),

packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v3/circular/zod.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export const zTreeNode: z.AnyZodObject = z.object({
88
children: z.array(z.lazy(() => zTreeNode)).optional()
99
});
1010

11+
export const zWrapper = z.object({
12+
label: z.string(),
13+
tree: zTreeNode
14+
});
15+
1116
export const zComment: z.AnyZodObject = z.object({
1217
id: z.string(),
1318
text: z.string(),

packages/openapi-ts-tests/zod/v3/__snapshots__/3.0.x/v4/circular/zod.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export const zTreeNode = z.object({
88
children: z.array(z.lazy((): any => zTreeNode)).optional()
99
});
1010

11+
export const zWrapper = z.object({
12+
label: z.string(),
13+
tree: zTreeNode
14+
});
15+
1116
export const zComment = z.object({
1217
id: z.string(),
1318
text: z.string(),

packages/openapi-ts-tests/zod/v4/__snapshots__/3.0.x/mini/circular/zod.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ export const zTreeNode = z.object({
88
children: z.optional(z.array(z.lazy((): any => zTreeNode)))
99
});
1010

11+
export const zWrapper = z.object({
12+
label: z.string(),
13+
tree: zTreeNode
14+
});
15+
1116
export const zComment = z.object({
1217
id: z.string(),
1318
text: z.string(),

0 commit comments

Comments
 (0)