@kubb/plugin-oas 3.10.10 → 3.10.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{OperationGenerator-BFmQs4BO.d.cts → OperationGenerator-CF1rxGSV.d.ts} +2 -273
- package/dist/{OperationGenerator-BFmQs4BO.d.ts → OperationGenerator-DxdJDBEc.d.cts} +2 -273
- package/dist/{Schema-Cmvkb9CW.d.ts → Schema-AjebpeVY.d.ts} +1 -1
- package/dist/{Schema-BunfYze0.d.cts → Schema-M6983FL1.d.cts} +1 -1
- package/dist/SchemaMapper-B21ZmWag.d.cts +275 -0
- package/dist/SchemaMapper-B21ZmWag.d.ts +275 -0
- package/dist/chunk-6S7YFY6F.js +33 -0
- package/dist/chunk-6S7YFY6F.js.map +1 -0
- package/dist/chunk-76E35IZ2.js +56 -0
- package/dist/chunk-76E35IZ2.js.map +1 -0
- package/dist/chunk-DTD4ZUDA.cjs +36 -0
- package/dist/chunk-DTD4ZUDA.cjs.map +1 -0
- package/dist/{chunk-QDPL3I3X.js → chunk-HLZZQQYR.js} +33 -91
- package/dist/chunk-HLZZQQYR.js.map +1 -0
- package/dist/chunk-RSHQODEK.cjs +35 -0
- package/dist/chunk-RSHQODEK.cjs.map +1 -0
- package/dist/{chunk-Y6YAXTK5.cjs → chunk-S3UPJP7I.cjs} +5 -5
- package/dist/chunk-S3UPJP7I.cjs.map +1 -0
- package/dist/{chunk-6HG3X5MB.js → chunk-S7ZYTJXL.js} +3 -3
- package/dist/chunk-S7ZYTJXL.js.map +1 -0
- package/dist/{chunk-7U6BHIOO.cjs → chunk-WAB2O4DX.cjs} +116 -176
- package/dist/chunk-WAB2O4DX.cjs.map +1 -0
- package/dist/chunk-YWMMI3MO.cjs +59 -0
- package/dist/chunk-YWMMI3MO.cjs.map +1 -0
- package/dist/chunk-Z4S5R2AE.js +29 -0
- package/dist/chunk-Z4S5R2AE.js.map +1 -0
- package/dist/components.cjs +0 -1
- package/dist/components.d.cts +4 -3
- package/dist/components.d.ts +4 -3
- package/dist/components.js +0 -1
- package/dist/generators.cjs +3 -5
- package/dist/generators.d.cts +2 -1
- package/dist/generators.d.ts +2 -1
- package/dist/generators.js +2 -4
- package/dist/hooks.cjs +3 -2
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +3 -2
- package/dist/hooks.d.ts +3 -2
- package/dist/hooks.js +2 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +733 -0
- package/dist/mocks.cjs.map +1 -0
- package/dist/mocks.d.cts +15 -0
- package/dist/mocks.d.ts +15 -0
- package/dist/mocks.js +731 -0
- package/dist/mocks.js.map +1 -0
- package/dist/utils.cjs +61 -18
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -1
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +51 -1
- package/dist/utils.js.map +1 -1
- package/package.json +15 -7
- package/src/SchemaGenerator.ts +27 -39
- package/src/generator.tsx +1 -1
- package/src/generators/jsonGenerator.ts +2 -1
- package/src/mocks/index.ts +1 -0
- package/src/mocks/schemas.ts +728 -0
- package/src/utils/parseFromConfig.ts +1 -1
- package/dist/chunk-6HG3X5MB.js.map +0 -1
- package/dist/chunk-7U6BHIOO.cjs.map +0 -1
- package/dist/chunk-DEDONPUL.cjs +0 -114
- package/dist/chunk-DEDONPUL.cjs.map +0 -1
- package/dist/chunk-PADR76WZ.cjs +0 -4
- package/dist/chunk-PADR76WZ.cjs.map +0 -1
- package/dist/chunk-QDPL3I3X.js.map +0 -1
- package/dist/chunk-QPFZUPQA.js +0 -100
- package/dist/chunk-QPFZUPQA.js.map +0 -1
- package/dist/chunk-R47XMJ32.js +0 -3
- package/dist/chunk-R47XMJ32.js.map +0 -1
- package/dist/chunk-Y6YAXTK5.cjs.map +0 -1
|
@@ -2,278 +2,7 @@ import { Plugin, Output, Group, PluginFactoryOptions, ResolveNameParams, FileMet
|
|
|
2
2
|
import { KubbFile } from '@kubb/core/fs';
|
|
3
3
|
import { HttpMethod, Operation, SchemaObject, Oas, contentType } from '@kubb/oas';
|
|
4
4
|
import { KubbNode } from '@kubb/react/types';
|
|
5
|
-
|
|
6
|
-
type SchemaKeywordMapper = {
|
|
7
|
-
object: {
|
|
8
|
-
keyword: 'object';
|
|
9
|
-
args: {
|
|
10
|
-
properties: {
|
|
11
|
-
[x: string]: Schema[];
|
|
12
|
-
};
|
|
13
|
-
additionalProperties: Schema[];
|
|
14
|
-
strict?: boolean;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
url: {
|
|
18
|
-
keyword: 'url';
|
|
19
|
-
};
|
|
20
|
-
readOnly: {
|
|
21
|
-
keyword: 'readOnly';
|
|
22
|
-
};
|
|
23
|
-
writeOnly: {
|
|
24
|
-
keyword: 'writeOnly';
|
|
25
|
-
};
|
|
26
|
-
uuid: {
|
|
27
|
-
keyword: 'uuid';
|
|
28
|
-
};
|
|
29
|
-
email: {
|
|
30
|
-
keyword: 'email';
|
|
31
|
-
};
|
|
32
|
-
firstName: {
|
|
33
|
-
keyword: 'firstName';
|
|
34
|
-
};
|
|
35
|
-
lastName: {
|
|
36
|
-
keyword: 'lastName';
|
|
37
|
-
};
|
|
38
|
-
phone: {
|
|
39
|
-
keyword: 'phone';
|
|
40
|
-
};
|
|
41
|
-
password: {
|
|
42
|
-
keyword: 'password';
|
|
43
|
-
};
|
|
44
|
-
date: {
|
|
45
|
-
keyword: 'date';
|
|
46
|
-
args: {
|
|
47
|
-
type?: 'date' | 'string';
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
time: {
|
|
51
|
-
keyword: 'time';
|
|
52
|
-
args: {
|
|
53
|
-
type?: 'date' | 'string';
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
datetime: {
|
|
57
|
-
keyword: 'datetime';
|
|
58
|
-
args: {
|
|
59
|
-
offset?: boolean;
|
|
60
|
-
local?: boolean;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
tuple: {
|
|
64
|
-
keyword: 'tuple';
|
|
65
|
-
args: {
|
|
66
|
-
items: Schema[];
|
|
67
|
-
min?: number;
|
|
68
|
-
max?: number;
|
|
69
|
-
rest?: Schema;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
array: {
|
|
73
|
-
keyword: 'array';
|
|
74
|
-
args: {
|
|
75
|
-
items: Schema[];
|
|
76
|
-
min?: number;
|
|
77
|
-
max?: number;
|
|
78
|
-
unique?: boolean;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
enum: {
|
|
82
|
-
keyword: 'enum';
|
|
83
|
-
args: {
|
|
84
|
-
name: string;
|
|
85
|
-
typeName: string;
|
|
86
|
-
asConst: boolean;
|
|
87
|
-
items: Array<{
|
|
88
|
-
name: string | number;
|
|
89
|
-
format: 'string' | 'number' | 'boolean';
|
|
90
|
-
value?: string | number | boolean;
|
|
91
|
-
}>;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
and: {
|
|
95
|
-
keyword: 'and';
|
|
96
|
-
args: Schema[];
|
|
97
|
-
};
|
|
98
|
-
const: {
|
|
99
|
-
keyword: 'const';
|
|
100
|
-
args: {
|
|
101
|
-
name: string | number;
|
|
102
|
-
format: 'string' | 'number' | 'boolean';
|
|
103
|
-
value?: string | number | boolean;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
union: {
|
|
107
|
-
keyword: 'union';
|
|
108
|
-
args: Schema[];
|
|
109
|
-
};
|
|
110
|
-
ref: {
|
|
111
|
-
keyword: 'ref';
|
|
112
|
-
args: {
|
|
113
|
-
name: string;
|
|
114
|
-
$ref: string;
|
|
115
|
-
/**
|
|
116
|
-
* Full qualified path.
|
|
117
|
-
*/
|
|
118
|
-
path: KubbFile.OptionalPath;
|
|
119
|
-
/**
|
|
120
|
-
* When true `File.Import` will be used.
|
|
121
|
-
* When false a reference will be used inside the current file.
|
|
122
|
-
*/
|
|
123
|
-
isImportable: boolean;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
matches: {
|
|
127
|
-
keyword: 'matches';
|
|
128
|
-
args?: string;
|
|
129
|
-
};
|
|
130
|
-
boolean: {
|
|
131
|
-
keyword: 'boolean';
|
|
132
|
-
};
|
|
133
|
-
default: {
|
|
134
|
-
keyword: 'default';
|
|
135
|
-
args: string | number | boolean;
|
|
136
|
-
};
|
|
137
|
-
string: {
|
|
138
|
-
keyword: 'string';
|
|
139
|
-
};
|
|
140
|
-
integer: {
|
|
141
|
-
keyword: 'integer';
|
|
142
|
-
};
|
|
143
|
-
number: {
|
|
144
|
-
keyword: 'number';
|
|
145
|
-
};
|
|
146
|
-
max: {
|
|
147
|
-
keyword: 'max';
|
|
148
|
-
args: number;
|
|
149
|
-
};
|
|
150
|
-
min: {
|
|
151
|
-
keyword: 'min';
|
|
152
|
-
args: number;
|
|
153
|
-
};
|
|
154
|
-
describe: {
|
|
155
|
-
keyword: 'describe';
|
|
156
|
-
args: string;
|
|
157
|
-
};
|
|
158
|
-
example: {
|
|
159
|
-
keyword: 'example';
|
|
160
|
-
args: string;
|
|
161
|
-
};
|
|
162
|
-
deprecated: {
|
|
163
|
-
keyword: 'deprecated';
|
|
164
|
-
};
|
|
165
|
-
optional: {
|
|
166
|
-
keyword: 'optional';
|
|
167
|
-
};
|
|
168
|
-
undefined: {
|
|
169
|
-
keyword: 'undefined';
|
|
170
|
-
};
|
|
171
|
-
nullish: {
|
|
172
|
-
keyword: 'nullish';
|
|
173
|
-
};
|
|
174
|
-
nullable: {
|
|
175
|
-
keyword: 'nullable';
|
|
176
|
-
};
|
|
177
|
-
null: {
|
|
178
|
-
keyword: 'null';
|
|
179
|
-
};
|
|
180
|
-
any: {
|
|
181
|
-
keyword: 'any';
|
|
182
|
-
};
|
|
183
|
-
unknown: {
|
|
184
|
-
keyword: 'unknown';
|
|
185
|
-
};
|
|
186
|
-
void: {
|
|
187
|
-
keyword: 'void';
|
|
188
|
-
};
|
|
189
|
-
blob: {
|
|
190
|
-
keyword: 'blob';
|
|
191
|
-
};
|
|
192
|
-
schema: {
|
|
193
|
-
keyword: 'schema';
|
|
194
|
-
args: {
|
|
195
|
-
type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
|
|
196
|
-
format?: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
name: {
|
|
200
|
-
keyword: 'name';
|
|
201
|
-
args: string;
|
|
202
|
-
};
|
|
203
|
-
catchall: {
|
|
204
|
-
keyword: 'catchall';
|
|
205
|
-
};
|
|
206
|
-
interface: {
|
|
207
|
-
keyword: 'interface';
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
declare const schemaKeywords: {
|
|
211
|
-
any: "any";
|
|
212
|
-
unknown: "unknown";
|
|
213
|
-
number: "number";
|
|
214
|
-
integer: "integer";
|
|
215
|
-
string: "string";
|
|
216
|
-
boolean: "boolean";
|
|
217
|
-
undefined: "undefined";
|
|
218
|
-
nullable: "nullable";
|
|
219
|
-
null: "null";
|
|
220
|
-
nullish: "nullish";
|
|
221
|
-
array: "array";
|
|
222
|
-
tuple: "tuple";
|
|
223
|
-
enum: "enum";
|
|
224
|
-
union: "union";
|
|
225
|
-
datetime: "datetime";
|
|
226
|
-
date: "date";
|
|
227
|
-
email: "email";
|
|
228
|
-
uuid: "uuid";
|
|
229
|
-
url: "url";
|
|
230
|
-
void: "void";
|
|
231
|
-
default: "default";
|
|
232
|
-
const: "const";
|
|
233
|
-
and: "and";
|
|
234
|
-
describe: "describe";
|
|
235
|
-
min: "min";
|
|
236
|
-
max: "max";
|
|
237
|
-
optional: "optional";
|
|
238
|
-
readOnly: "readOnly";
|
|
239
|
-
writeOnly: "writeOnly";
|
|
240
|
-
object: "object";
|
|
241
|
-
ref: "ref";
|
|
242
|
-
matches: "matches";
|
|
243
|
-
firstName: "firstName";
|
|
244
|
-
lastName: "lastName";
|
|
245
|
-
password: "password";
|
|
246
|
-
phone: "phone";
|
|
247
|
-
blob: "blob";
|
|
248
|
-
deprecated: "deprecated";
|
|
249
|
-
example: "example";
|
|
250
|
-
schema: "schema";
|
|
251
|
-
catchall: "catchall";
|
|
252
|
-
time: "time";
|
|
253
|
-
name: "name";
|
|
254
|
-
interface: "interface";
|
|
255
|
-
};
|
|
256
|
-
type SchemaKeyword = keyof SchemaKeywordMapper;
|
|
257
|
-
type SchemaMapper<T = string | null | undefined> = {
|
|
258
|
-
[K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined;
|
|
259
|
-
};
|
|
260
|
-
type SchemaKeywordBase<T> = {
|
|
261
|
-
keyword: SchemaKeyword;
|
|
262
|
-
args: T;
|
|
263
|
-
};
|
|
264
|
-
type Schema = {
|
|
265
|
-
keyword: string;
|
|
266
|
-
} | SchemaKeywordMapper[keyof SchemaKeywordMapper];
|
|
267
|
-
type SchemaTree = {
|
|
268
|
-
parent: Schema | undefined;
|
|
269
|
-
current: Schema;
|
|
270
|
-
siblings: Schema[];
|
|
271
|
-
/**
|
|
272
|
-
* this will be equal to the key of a property(object)
|
|
273
|
-
*/
|
|
274
|
-
name?: string;
|
|
275
|
-
};
|
|
276
|
-
declare function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]>;
|
|
5
|
+
import { S as Schema, d as SchemaKeywordMapper } from './SchemaMapper-B21ZmWag.js';
|
|
277
6
|
|
|
278
7
|
type ResolvePathOptions = {
|
|
279
8
|
pluginKey?: Plugin['key'];
|
|
@@ -556,4 +285,4 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
|
|
|
556
285
|
all(_operations: Operation[], _paths: OperationsByMethod): OperationMethodResult<TFileMeta>;
|
|
557
286
|
}
|
|
558
287
|
|
|
559
|
-
export { type API as A, type Exclude as E, type GetSchemaGeneratorOptions as G, type Include as I, type Options as O, type PluginOas as P, type ReactGeneratorOptions as R, type SchemaGeneratorBuildOptions as S, type OperationMethodResult as a, OperationGenerator as b, type SchemaGeneratorOptions as c, type SchemaMethodResult as d, SchemaGenerator as e,
|
|
288
|
+
export { type API as A, type Exclude as E, type GetSchemaGeneratorOptions as G, type Include as I, type Options as O, type PluginOas as P, type ReactGeneratorOptions as R, type SchemaGeneratorBuildOptions as S, type OperationMethodResult as a, OperationGenerator as b, type SchemaGeneratorOptions as c, type SchemaMethodResult as d, SchemaGenerator as e, createGenerator as f, createReactGenerator as g, type Generator as h, type GeneratorOptions as i, type ResolvePathOptions as j, type Ref as k, type Refs as l, type Resolver as m, type OperationSchema as n, type OperationSchemas as o, type OperationsByMethod as p, type Override as q };
|
|
@@ -2,278 +2,7 @@ import { Plugin, Output, Group, PluginFactoryOptions, ResolveNameParams, FileMet
|
|
|
2
2
|
import { KubbFile } from '@kubb/core/fs';
|
|
3
3
|
import { HttpMethod, Operation, SchemaObject, Oas, contentType } from '@kubb/oas';
|
|
4
4
|
import { KubbNode } from '@kubb/react/types';
|
|
5
|
-
|
|
6
|
-
type SchemaKeywordMapper = {
|
|
7
|
-
object: {
|
|
8
|
-
keyword: 'object';
|
|
9
|
-
args: {
|
|
10
|
-
properties: {
|
|
11
|
-
[x: string]: Schema[];
|
|
12
|
-
};
|
|
13
|
-
additionalProperties: Schema[];
|
|
14
|
-
strict?: boolean;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
url: {
|
|
18
|
-
keyword: 'url';
|
|
19
|
-
};
|
|
20
|
-
readOnly: {
|
|
21
|
-
keyword: 'readOnly';
|
|
22
|
-
};
|
|
23
|
-
writeOnly: {
|
|
24
|
-
keyword: 'writeOnly';
|
|
25
|
-
};
|
|
26
|
-
uuid: {
|
|
27
|
-
keyword: 'uuid';
|
|
28
|
-
};
|
|
29
|
-
email: {
|
|
30
|
-
keyword: 'email';
|
|
31
|
-
};
|
|
32
|
-
firstName: {
|
|
33
|
-
keyword: 'firstName';
|
|
34
|
-
};
|
|
35
|
-
lastName: {
|
|
36
|
-
keyword: 'lastName';
|
|
37
|
-
};
|
|
38
|
-
phone: {
|
|
39
|
-
keyword: 'phone';
|
|
40
|
-
};
|
|
41
|
-
password: {
|
|
42
|
-
keyword: 'password';
|
|
43
|
-
};
|
|
44
|
-
date: {
|
|
45
|
-
keyword: 'date';
|
|
46
|
-
args: {
|
|
47
|
-
type?: 'date' | 'string';
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
time: {
|
|
51
|
-
keyword: 'time';
|
|
52
|
-
args: {
|
|
53
|
-
type?: 'date' | 'string';
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
datetime: {
|
|
57
|
-
keyword: 'datetime';
|
|
58
|
-
args: {
|
|
59
|
-
offset?: boolean;
|
|
60
|
-
local?: boolean;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
tuple: {
|
|
64
|
-
keyword: 'tuple';
|
|
65
|
-
args: {
|
|
66
|
-
items: Schema[];
|
|
67
|
-
min?: number;
|
|
68
|
-
max?: number;
|
|
69
|
-
rest?: Schema;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
array: {
|
|
73
|
-
keyword: 'array';
|
|
74
|
-
args: {
|
|
75
|
-
items: Schema[];
|
|
76
|
-
min?: number;
|
|
77
|
-
max?: number;
|
|
78
|
-
unique?: boolean;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
enum: {
|
|
82
|
-
keyword: 'enum';
|
|
83
|
-
args: {
|
|
84
|
-
name: string;
|
|
85
|
-
typeName: string;
|
|
86
|
-
asConst: boolean;
|
|
87
|
-
items: Array<{
|
|
88
|
-
name: string | number;
|
|
89
|
-
format: 'string' | 'number' | 'boolean';
|
|
90
|
-
value?: string | number | boolean;
|
|
91
|
-
}>;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
and: {
|
|
95
|
-
keyword: 'and';
|
|
96
|
-
args: Schema[];
|
|
97
|
-
};
|
|
98
|
-
const: {
|
|
99
|
-
keyword: 'const';
|
|
100
|
-
args: {
|
|
101
|
-
name: string | number;
|
|
102
|
-
format: 'string' | 'number' | 'boolean';
|
|
103
|
-
value?: string | number | boolean;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
union: {
|
|
107
|
-
keyword: 'union';
|
|
108
|
-
args: Schema[];
|
|
109
|
-
};
|
|
110
|
-
ref: {
|
|
111
|
-
keyword: 'ref';
|
|
112
|
-
args: {
|
|
113
|
-
name: string;
|
|
114
|
-
$ref: string;
|
|
115
|
-
/**
|
|
116
|
-
* Full qualified path.
|
|
117
|
-
*/
|
|
118
|
-
path: KubbFile.OptionalPath;
|
|
119
|
-
/**
|
|
120
|
-
* When true `File.Import` will be used.
|
|
121
|
-
* When false a reference will be used inside the current file.
|
|
122
|
-
*/
|
|
123
|
-
isImportable: boolean;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
matches: {
|
|
127
|
-
keyword: 'matches';
|
|
128
|
-
args?: string;
|
|
129
|
-
};
|
|
130
|
-
boolean: {
|
|
131
|
-
keyword: 'boolean';
|
|
132
|
-
};
|
|
133
|
-
default: {
|
|
134
|
-
keyword: 'default';
|
|
135
|
-
args: string | number | boolean;
|
|
136
|
-
};
|
|
137
|
-
string: {
|
|
138
|
-
keyword: 'string';
|
|
139
|
-
};
|
|
140
|
-
integer: {
|
|
141
|
-
keyword: 'integer';
|
|
142
|
-
};
|
|
143
|
-
number: {
|
|
144
|
-
keyword: 'number';
|
|
145
|
-
};
|
|
146
|
-
max: {
|
|
147
|
-
keyword: 'max';
|
|
148
|
-
args: number;
|
|
149
|
-
};
|
|
150
|
-
min: {
|
|
151
|
-
keyword: 'min';
|
|
152
|
-
args: number;
|
|
153
|
-
};
|
|
154
|
-
describe: {
|
|
155
|
-
keyword: 'describe';
|
|
156
|
-
args: string;
|
|
157
|
-
};
|
|
158
|
-
example: {
|
|
159
|
-
keyword: 'example';
|
|
160
|
-
args: string;
|
|
161
|
-
};
|
|
162
|
-
deprecated: {
|
|
163
|
-
keyword: 'deprecated';
|
|
164
|
-
};
|
|
165
|
-
optional: {
|
|
166
|
-
keyword: 'optional';
|
|
167
|
-
};
|
|
168
|
-
undefined: {
|
|
169
|
-
keyword: 'undefined';
|
|
170
|
-
};
|
|
171
|
-
nullish: {
|
|
172
|
-
keyword: 'nullish';
|
|
173
|
-
};
|
|
174
|
-
nullable: {
|
|
175
|
-
keyword: 'nullable';
|
|
176
|
-
};
|
|
177
|
-
null: {
|
|
178
|
-
keyword: 'null';
|
|
179
|
-
};
|
|
180
|
-
any: {
|
|
181
|
-
keyword: 'any';
|
|
182
|
-
};
|
|
183
|
-
unknown: {
|
|
184
|
-
keyword: 'unknown';
|
|
185
|
-
};
|
|
186
|
-
void: {
|
|
187
|
-
keyword: 'void';
|
|
188
|
-
};
|
|
189
|
-
blob: {
|
|
190
|
-
keyword: 'blob';
|
|
191
|
-
};
|
|
192
|
-
schema: {
|
|
193
|
-
keyword: 'schema';
|
|
194
|
-
args: {
|
|
195
|
-
type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
|
|
196
|
-
format?: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
name: {
|
|
200
|
-
keyword: 'name';
|
|
201
|
-
args: string;
|
|
202
|
-
};
|
|
203
|
-
catchall: {
|
|
204
|
-
keyword: 'catchall';
|
|
205
|
-
};
|
|
206
|
-
interface: {
|
|
207
|
-
keyword: 'interface';
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
declare const schemaKeywords: {
|
|
211
|
-
any: "any";
|
|
212
|
-
unknown: "unknown";
|
|
213
|
-
number: "number";
|
|
214
|
-
integer: "integer";
|
|
215
|
-
string: "string";
|
|
216
|
-
boolean: "boolean";
|
|
217
|
-
undefined: "undefined";
|
|
218
|
-
nullable: "nullable";
|
|
219
|
-
null: "null";
|
|
220
|
-
nullish: "nullish";
|
|
221
|
-
array: "array";
|
|
222
|
-
tuple: "tuple";
|
|
223
|
-
enum: "enum";
|
|
224
|
-
union: "union";
|
|
225
|
-
datetime: "datetime";
|
|
226
|
-
date: "date";
|
|
227
|
-
email: "email";
|
|
228
|
-
uuid: "uuid";
|
|
229
|
-
url: "url";
|
|
230
|
-
void: "void";
|
|
231
|
-
default: "default";
|
|
232
|
-
const: "const";
|
|
233
|
-
and: "and";
|
|
234
|
-
describe: "describe";
|
|
235
|
-
min: "min";
|
|
236
|
-
max: "max";
|
|
237
|
-
optional: "optional";
|
|
238
|
-
readOnly: "readOnly";
|
|
239
|
-
writeOnly: "writeOnly";
|
|
240
|
-
object: "object";
|
|
241
|
-
ref: "ref";
|
|
242
|
-
matches: "matches";
|
|
243
|
-
firstName: "firstName";
|
|
244
|
-
lastName: "lastName";
|
|
245
|
-
password: "password";
|
|
246
|
-
phone: "phone";
|
|
247
|
-
blob: "blob";
|
|
248
|
-
deprecated: "deprecated";
|
|
249
|
-
example: "example";
|
|
250
|
-
schema: "schema";
|
|
251
|
-
catchall: "catchall";
|
|
252
|
-
time: "time";
|
|
253
|
-
name: "name";
|
|
254
|
-
interface: "interface";
|
|
255
|
-
};
|
|
256
|
-
type SchemaKeyword = keyof SchemaKeywordMapper;
|
|
257
|
-
type SchemaMapper<T = string | null | undefined> = {
|
|
258
|
-
[K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined;
|
|
259
|
-
};
|
|
260
|
-
type SchemaKeywordBase<T> = {
|
|
261
|
-
keyword: SchemaKeyword;
|
|
262
|
-
args: T;
|
|
263
|
-
};
|
|
264
|
-
type Schema = {
|
|
265
|
-
keyword: string;
|
|
266
|
-
} | SchemaKeywordMapper[keyof SchemaKeywordMapper];
|
|
267
|
-
type SchemaTree = {
|
|
268
|
-
parent: Schema | undefined;
|
|
269
|
-
current: Schema;
|
|
270
|
-
siblings: Schema[];
|
|
271
|
-
/**
|
|
272
|
-
* this will be equal to the key of a property(object)
|
|
273
|
-
*/
|
|
274
|
-
name?: string;
|
|
275
|
-
};
|
|
276
|
-
declare function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]>;
|
|
5
|
+
import { S as Schema, d as SchemaKeywordMapper } from './SchemaMapper-B21ZmWag.cjs';
|
|
277
6
|
|
|
278
7
|
type ResolvePathOptions = {
|
|
279
8
|
pluginKey?: Plugin['key'];
|
|
@@ -556,4 +285,4 @@ declare class OperationGenerator<TPluginOptions extends PluginFactoryOptions = P
|
|
|
556
285
|
all(_operations: Operation[], _paths: OperationsByMethod): OperationMethodResult<TFileMeta>;
|
|
557
286
|
}
|
|
558
287
|
|
|
559
|
-
export { type API as A, type Exclude as E, type GetSchemaGeneratorOptions as G, type Include as I, type Options as O, type PluginOas as P, type ReactGeneratorOptions as R, type SchemaGeneratorBuildOptions as S, type OperationMethodResult as a, OperationGenerator as b, type SchemaGeneratorOptions as c, type SchemaMethodResult as d, SchemaGenerator as e,
|
|
288
|
+
export { type API as A, type Exclude as E, type GetSchemaGeneratorOptions as G, type Include as I, type Options as O, type PluginOas as P, type ReactGeneratorOptions as R, type SchemaGeneratorBuildOptions as S, type OperationMethodResult as a, OperationGenerator as b, type SchemaGeneratorOptions as c, type SchemaMethodResult as d, SchemaGenerator as e, createGenerator as f, createReactGenerator as g, type Generator as h, type GeneratorOptions as i, type ResolvePathOptions as j, type Ref as k, type Refs as l, type Resolver as m, type OperationSchema as n, type OperationSchemas as o, type OperationsByMethod as p, type Override as q };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { SchemaObject } from '@kubb/oas';
|
|
3
3
|
import { Key, KubbNode } from '@kubb/react/types';
|
|
4
|
-
import {
|
|
4
|
+
import { S as Schema$1 } from './SchemaMapper-B21ZmWag.js';
|
|
5
5
|
|
|
6
6
|
type SchemaContextProps = {
|
|
7
7
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { SchemaObject } from '@kubb/oas';
|
|
3
3
|
import { Key, KubbNode } from '@kubb/react/types';
|
|
4
|
-
import {
|
|
4
|
+
import { S as Schema$1 } from './SchemaMapper-B21ZmWag.cjs';
|
|
5
5
|
|
|
6
6
|
type SchemaContextProps = {
|
|
7
7
|
name: string;
|