-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathschemas.ts
More file actions
78 lines (65 loc) · 2.13 KB
/
schemas.ts
File metadata and controls
78 lines (65 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/** AUTOGENERATED - DO NOT EDIT **/
/* tslint:disable */
/* eslint-disable */
import {z} from "zod/v4"
import type {UnknownEnumNumberValue, UnknownEnumStringValue} from "./models.ts"
export const s_Enumerations = z.object({
colors: z.union([
z.enum(["red", "green", "blue"]),
z.string().transform((it) => it as typeof it & UnknownEnumStringValue),
]),
starRatings: z.union([
z.literal(1),
z.literal(2),
z.literal(3),
z.number().transform((it) => it as typeof it & UnknownEnumNumberValue),
]),
})
export const s_ProductOrder = z.object({
sku: z.string().optional(),
quantity: z.coerce.number().min(1).optional(),
address: z
.object({address1: z.string().optional(), postcode: z.string().optional()})
.optional(),
})
export const s_RandomNumber = z.object({
result: z.coerce.number().optional(),
params: z
.object({
min: z.coerce.number().optional(),
max: z.coerce.number().optional(),
forbidden: z.array(z.coerce.number()).optional(),
})
.optional(),
})
export const s_GetHeadersUndeclared200Response = z.object({
rawHeaders: z.record(z.string(), z.unknown()).optional(),
typedHeaders: z.unknown().optional(),
})
export const s_GetHeadersRequest200Response = z.object({
rawHeaders: z.record(z.string(), z.unknown()).optional(),
typedHeaders: z.unknown().optional(),
})
export const s_GetParamsSimpleQuery200Response = z.object({
orderBy: z.string(),
limit: z.coerce.number(),
})
export const s_GetParamsDefaultObjectQuery200Response = z.object({
filter: z.object({name: z.string(), age: z.coerce.number()}),
})
export const s_GetParamsUnexplodedObjectQuery200Response = z.object({
filter: z.object({name: z.string(), age: z.coerce.number()}),
})
export const s_GetParamsMixedQuery200Response = z.object({
limit: z.coerce.number().optional(),
statuses: z.array(z.string()).optional(),
})
export const s_PostValidationOptionalBody200Response = z.object({
id: z.string().optional(),
})
export const s_GetResponsesDefault200Response = z.object({
id: z.string().optional(),
})
export const s_GetResponsesDefaultdefaultResponse = z.object({
error: z.string().optional(),
})