Skip to content

Commit 9552da2

Browse files
committed
chore: add graph to context
1 parent 523038e commit 9552da2

File tree

41 files changed

+2334
-1728
lines changed

Some content is hidden

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

41 files changed

+2334
-1728
lines changed

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/valibot/default/valibot.gen.ts

Lines changed: 92 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,98 @@ export const vExternalSharedExternalSharedModel = v.object({
77
name: v.optional(v.string())
88
});
99

10+
/**
11+
* This is a model with one string property
12+
*/
13+
export const vModelWithString = v.object({
14+
prop: v.optional(v.string())
15+
});
16+
17+
/**
18+
* This is a model with one nested property
19+
*/
20+
export const vModelWithProperties = v.object({
21+
required: v.string(),
22+
requiredAndReadOnly: v.pipe(v.string(), v.readonly()),
23+
string: v.optional(v.string()),
24+
number: v.optional(v.number()),
25+
boolean: v.optional(v.boolean()),
26+
reference: v.optional(vModelWithString),
27+
'property with space': v.optional(v.string()),
28+
default: v.optional(v.string()),
29+
try: v.optional(v.string()),
30+
'@namespace.string': v.optional(v.pipe(v.string(), v.readonly())),
31+
'@namespace.integer': v.optional(v.pipe(v.pipe(v.number(), v.integer()), v.readonly()))
32+
});
33+
34+
/**
35+
* This is a model with one property containing a circular reference
36+
*/
37+
export const vModelWithCircularReference: v.GenericSchema = v.object({
38+
prop: v.optional(v.lazy(() => {
39+
return vModelWithCircularReference;
40+
}))
41+
});
42+
43+
/**
44+
* This is a model that extends another model
45+
*/
46+
export const vModelThatExtends = v.intersect([
47+
vModelWithString,
48+
v.object({
49+
propExtendsA: v.optional(v.string()),
50+
propExtendsB: v.optional(vModelWithString)
51+
})
52+
]);
53+
54+
/**
55+
* This is a model with one string property
56+
*/
57+
export const vModelWithStringError = v.object({
58+
prop: v.optional(v.string())
59+
});
60+
61+
/**
62+
* This is a model that extends another model
63+
*/
64+
export const vModelThatExtendsExtends: v.GenericSchema = v.intersect([
65+
vModelWithString,
66+
v.lazy(() => {
67+
return vModelThatExtends;
68+
}),
69+
v.object({
70+
propExtendsC: v.optional(v.string()),
71+
propExtendsD: v.optional(vModelWithString)
72+
})
73+
]);
74+
75+
/**
76+
* A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)
77+
*/
78+
export const vNonAsciiStringæøåÆøÅöôêÊ字符串 = v.string();
79+
80+
export const vParameterActivityParams = v.object({
81+
description: v.optional(v.string()),
82+
graduate_id: v.optional(v.pipe(v.number(), v.integer())),
83+
organization_id: v.optional(v.pipe(v.number(), v.integer())),
84+
parent_activity: v.optional(v.pipe(v.number(), v.integer())),
85+
post_id: v.optional(v.pipe(v.number(), v.integer()))
86+
});
87+
88+
export const vResponsePostActivityResponse = v.object({
89+
description: v.optional(v.string()),
90+
graduate_id: v.optional(v.pipe(v.number(), v.integer())),
91+
organization_id: v.optional(v.pipe(v.number(), v.integer())),
92+
parent_activity_id: v.optional(v.pipe(v.number(), v.integer())),
93+
post_id: v.optional(v.pipe(v.number(), v.integer()))
94+
});
95+
96+
export const vFailureFailure = v.object({
97+
error: v.optional(v.string()),
98+
message: v.optional(v.string()),
99+
reference_code: v.optional(v.string())
100+
});
101+
10102
export const vExternalRefA = vExternalSharedExternalSharedModel;
11103

12104
export const vExternalRefB = vExternalSharedExternalSharedModel;
@@ -64,23 +156,11 @@ export const vSimpleBoolean = v.boolean();
64156
*/
65157
export const vSimpleString = v.string();
66158

67-
/**
68-
* A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串)
69-
*/
70-
export const vNonAsciiStringæøåÆøÅöôêÊ字符串 = v.string();
71-
72159
/**
73160
* This is a simple file
74161
*/
75162
export const vSimpleFile = v.string();
76163

77-
/**
78-
* This is a model with one string property
79-
*/
80-
export const vModelWithString = v.object({
81-
prop: v.optional(v.string())
82-
});
83-
84164
export const vSimpleReference = vModelWithString;
85165

86166
/**
@@ -195,13 +275,6 @@ export const vModelWithBoolean = v.object({
195275
prop: v.optional(v.boolean())
196276
});
197277

198-
/**
199-
* This is a model with one string property
200-
*/
201-
export const vModelWithStringError = v.object({
202-
prop: v.optional(v.string())
203-
});
204-
205278
/**
206279
* This is a model with one string property
207280
*/
@@ -258,23 +331,6 @@ export const vModelWithNestedEnums = v.object({
258331
arrayWithDescription: v.optional(v.array(v.pipe(v.number(), v.integer())))
259332
});
260333

261-
/**
262-
* This is a model with one nested property
263-
*/
264-
export const vModelWithProperties = v.object({
265-
required: v.string(),
266-
requiredAndReadOnly: v.pipe(v.string(), v.readonly()),
267-
string: v.optional(v.string()),
268-
number: v.optional(v.number()),
269-
boolean: v.optional(v.boolean()),
270-
reference: v.optional(vModelWithString),
271-
'property with space': v.optional(v.string()),
272-
default: v.optional(v.string()),
273-
try: v.optional(v.string()),
274-
'@namespace.string': v.optional(v.pipe(v.string(), v.readonly())),
275-
'@namespace.integer': v.optional(v.pipe(v.pipe(v.number(), v.integer()), v.readonly()))
276-
});
277-
278334
/**
279335
* This is a model with one property containing a reference
280336
*/
@@ -298,15 +354,6 @@ export const vModelWithDictionary = v.object({
298354
prop: v.optional(v.object({}))
299355
});
300356

301-
/**
302-
* This is a model with one property containing a circular reference
303-
*/
304-
export const vModelWithCircularReference: v.GenericSchema = v.object({
305-
prop: v.optional(v.lazy(() => {
306-
return vModelWithCircularReference;
307-
}))
308-
});
309-
310357
/**
311358
* This is a model with one nested property
312359
*/
@@ -343,29 +390,6 @@ export const vModelWithDuplicateImports = v.object({
343390
propC: v.optional(vModelWithString)
344391
});
345392

346-
/**
347-
* This is a model that extends another model
348-
*/
349-
export const vModelThatExtends = v.intersect([
350-
vModelWithString,
351-
v.object({
352-
propExtendsA: v.optional(v.string()),
353-
propExtendsB: v.optional(vModelWithString)
354-
})
355-
]);
356-
357-
/**
358-
* This is a model that extends another model
359-
*/
360-
export const vModelThatExtendsExtends = v.intersect([
361-
vModelWithString,
362-
vModelThatExtends,
363-
v.object({
364-
propExtendsC: v.optional(v.string()),
365-
propExtendsD: v.optional(vModelWithString)
366-
})
367-
]);
368-
369393
export const vDefault = v.object({
370394
name: v.optional(v.string())
371395
});
@@ -385,28 +409,6 @@ export const vModelWithPattern = v.object({
385409
patternWithBacktick: v.optional(v.pipe(v.string(), v.regex(/aaa`bbb/)))
386410
});
387411

388-
export const vParameterActivityParams = v.object({
389-
description: v.optional(v.string()),
390-
graduate_id: v.optional(v.pipe(v.number(), v.integer())),
391-
organization_id: v.optional(v.pipe(v.number(), v.integer())),
392-
parent_activity: v.optional(v.pipe(v.number(), v.integer())),
393-
post_id: v.optional(v.pipe(v.number(), v.integer()))
394-
});
395-
396-
export const vResponsePostActivityResponse = v.object({
397-
description: v.optional(v.string()),
398-
graduate_id: v.optional(v.pipe(v.number(), v.integer())),
399-
organization_id: v.optional(v.pipe(v.number(), v.integer())),
400-
parent_activity_id: v.optional(v.pipe(v.number(), v.integer())),
401-
post_id: v.optional(v.pipe(v.number(), v.integer()))
402-
});
403-
404-
export const vFailureFailure = v.object({
405-
error: v.optional(v.string()),
406-
message: v.optional(v.string()),
407-
reference_code: v.optional(v.string())
408-
});
409-
410412
/**
411413
* This is a model with one nested property
412414
*/

0 commit comments

Comments
 (0)