@kubb/plugin-oas 3.10.10 → 3.10.12
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-QF3E6S2N.js +29 -0
- package/dist/chunk-QF3E6S2N.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/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 +8 -7
- 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 +16 -8
- 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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkYWMMI3MO_cjs = require('./chunk-YWMMI3MO.cjs');
|
|
3
4
|
var chunkZVFL3NXX_cjs = require('./chunk-ZVFL3NXX.cjs');
|
|
4
5
|
var core = require('@kubb/core');
|
|
5
6
|
var transformers = require('@kubb/core/transformers');
|
|
@@ -11,58 +12,6 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
11
12
|
|
|
12
13
|
var transformers__default = /*#__PURE__*/_interopDefault(transformers);
|
|
13
14
|
|
|
14
|
-
// src/SchemaMapper.ts
|
|
15
|
-
var schemaKeywords = {
|
|
16
|
-
any: "any",
|
|
17
|
-
unknown: "unknown",
|
|
18
|
-
number: "number",
|
|
19
|
-
integer: "integer",
|
|
20
|
-
string: "string",
|
|
21
|
-
boolean: "boolean",
|
|
22
|
-
undefined: "undefined",
|
|
23
|
-
nullable: "nullable",
|
|
24
|
-
null: "null",
|
|
25
|
-
nullish: "nullish",
|
|
26
|
-
array: "array",
|
|
27
|
-
tuple: "tuple",
|
|
28
|
-
enum: "enum",
|
|
29
|
-
union: "union",
|
|
30
|
-
datetime: "datetime",
|
|
31
|
-
date: "date",
|
|
32
|
-
email: "email",
|
|
33
|
-
uuid: "uuid",
|
|
34
|
-
url: "url",
|
|
35
|
-
void: "void",
|
|
36
|
-
/* intersection */
|
|
37
|
-
default: "default",
|
|
38
|
-
const: "const",
|
|
39
|
-
and: "and",
|
|
40
|
-
describe: "describe",
|
|
41
|
-
min: "min",
|
|
42
|
-
max: "max",
|
|
43
|
-
optional: "optional",
|
|
44
|
-
readOnly: "readOnly",
|
|
45
|
-
writeOnly: "writeOnly",
|
|
46
|
-
// custom ones
|
|
47
|
-
object: "object",
|
|
48
|
-
ref: "ref",
|
|
49
|
-
matches: "matches",
|
|
50
|
-
firstName: "firstName",
|
|
51
|
-
lastName: "lastName",
|
|
52
|
-
password: "password",
|
|
53
|
-
phone: "phone",
|
|
54
|
-
blob: "blob",
|
|
55
|
-
deprecated: "deprecated",
|
|
56
|
-
example: "example",
|
|
57
|
-
schema: "schema",
|
|
58
|
-
catchall: "catchall",
|
|
59
|
-
time: "time",
|
|
60
|
-
name: "name",
|
|
61
|
-
interface: "interface"
|
|
62
|
-
};
|
|
63
|
-
function isKeyword(meta, keyword) {
|
|
64
|
-
return meta.keyword === keyword;
|
|
65
|
-
}
|
|
66
15
|
var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
67
16
|
// Collect the types of all referenced schemas, so we can export them later
|
|
68
17
|
refs = {};
|
|
@@ -91,7 +40,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
91
40
|
if (schema.keyword === keyword) {
|
|
92
41
|
foundItems.push(schema);
|
|
93
42
|
}
|
|
94
|
-
if (isKeyword(schema, schemaKeywords.object)) {
|
|
43
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.object)) {
|
|
95
44
|
Object.values(schema.args?.properties || {}).forEach((entrySchema) => {
|
|
96
45
|
foundItems.push(..._SchemaGenerator.deepSearch(entrySchema, keyword));
|
|
97
46
|
});
|
|
@@ -99,22 +48,22 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
99
48
|
foundItems.push(..._SchemaGenerator.deepSearch([entrySchema], keyword));
|
|
100
49
|
});
|
|
101
50
|
}
|
|
102
|
-
if (isKeyword(schema, schemaKeywords.array)) {
|
|
51
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.array)) {
|
|
103
52
|
schema.args.items.forEach((entrySchema) => {
|
|
104
53
|
foundItems.push(..._SchemaGenerator.deepSearch([entrySchema], keyword));
|
|
105
54
|
});
|
|
106
55
|
}
|
|
107
|
-
if (isKeyword(schema, schemaKeywords.and)) {
|
|
56
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.and)) {
|
|
108
57
|
schema.args.forEach((entrySchema) => {
|
|
109
58
|
foundItems.push(..._SchemaGenerator.deepSearch([entrySchema], keyword));
|
|
110
59
|
});
|
|
111
60
|
}
|
|
112
|
-
if (isKeyword(schema, schemaKeywords.tuple)) {
|
|
61
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.tuple)) {
|
|
113
62
|
schema.args.items.forEach((entrySchema) => {
|
|
114
63
|
foundItems.push(..._SchemaGenerator.deepSearch([entrySchema], keyword));
|
|
115
64
|
});
|
|
116
65
|
}
|
|
117
|
-
if (isKeyword(schema, schemaKeywords.union)) {
|
|
66
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.union)) {
|
|
118
67
|
schema.args.forEach((entrySchema) => {
|
|
119
68
|
foundItems.push(..._SchemaGenerator.deepSearch([entrySchema], keyword));
|
|
120
69
|
});
|
|
@@ -123,12 +72,12 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
123
72
|
return foundItems;
|
|
124
73
|
}
|
|
125
74
|
static findInObject(tree, keyword) {
|
|
126
|
-
let foundItem
|
|
75
|
+
let foundItem;
|
|
127
76
|
tree?.forEach((schema) => {
|
|
128
77
|
if (!foundItem && schema.keyword === keyword) {
|
|
129
78
|
foundItem = schema;
|
|
130
79
|
}
|
|
131
|
-
if (isKeyword(schema, schemaKeywords.object)) {
|
|
80
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.object)) {
|
|
132
81
|
Object.values(schema.args?.properties || {}).forEach((entrySchema) => {
|
|
133
82
|
if (!foundItem) {
|
|
134
83
|
foundItem = _SchemaGenerator.find(entrySchema, keyword);
|
|
@@ -144,33 +93,33 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
144
93
|
return foundItem;
|
|
145
94
|
}
|
|
146
95
|
static find(tree, keyword) {
|
|
147
|
-
let foundItem
|
|
96
|
+
let foundItem;
|
|
148
97
|
tree?.forEach((schema) => {
|
|
149
98
|
if (!foundItem && schema.keyword === keyword) {
|
|
150
99
|
foundItem = schema;
|
|
151
100
|
}
|
|
152
|
-
if (isKeyword(schema, schemaKeywords.array)) {
|
|
101
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.array)) {
|
|
153
102
|
schema.args.items.forEach((entrySchema) => {
|
|
154
103
|
if (!foundItem) {
|
|
155
104
|
foundItem = _SchemaGenerator.find([entrySchema], keyword);
|
|
156
105
|
}
|
|
157
106
|
});
|
|
158
107
|
}
|
|
159
|
-
if (isKeyword(schema, schemaKeywords.and)) {
|
|
108
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.and)) {
|
|
160
109
|
schema.args.forEach((entrySchema) => {
|
|
161
110
|
if (!foundItem) {
|
|
162
111
|
foundItem = _SchemaGenerator.find([entrySchema], keyword);
|
|
163
112
|
}
|
|
164
113
|
});
|
|
165
114
|
}
|
|
166
|
-
if (isKeyword(schema, schemaKeywords.tuple)) {
|
|
115
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.tuple)) {
|
|
167
116
|
schema.args.items.forEach((entrySchema) => {
|
|
168
117
|
if (!foundItem) {
|
|
169
118
|
foundItem = _SchemaGenerator.find([entrySchema], keyword);
|
|
170
119
|
}
|
|
171
120
|
});
|
|
172
121
|
}
|
|
173
|
-
if (isKeyword(schema, schemaKeywords.union)) {
|
|
122
|
+
if (chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.union)) {
|
|
174
123
|
schema.args.forEach((entrySchema) => {
|
|
175
124
|
if (!foundItem) {
|
|
176
125
|
foundItem = _SchemaGenerator.find([entrySchema], keyword);
|
|
@@ -199,12 +148,12 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
199
148
|
#getUnknownReturn(props) {
|
|
200
149
|
const options = this.#getOptions(props);
|
|
201
150
|
if (options.unknownType === "any") {
|
|
202
|
-
return schemaKeywords.any;
|
|
151
|
+
return chunkYWMMI3MO_cjs.schemaKeywords.any;
|
|
203
152
|
}
|
|
204
153
|
if (options.unknownType === "void") {
|
|
205
|
-
return schemaKeywords.void;
|
|
154
|
+
return chunkYWMMI3MO_cjs.schemaKeywords.void;
|
|
206
155
|
}
|
|
207
|
-
return schemaKeywords.unknown;
|
|
156
|
+
return chunkYWMMI3MO_cjs.schemaKeywords.unknown;
|
|
208
157
|
}
|
|
209
158
|
/**
|
|
210
159
|
* Recursively creates a type literal with the given props.
|
|
@@ -220,13 +169,13 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
220
169
|
const nullable = propertySchema.nullable ?? propertySchema["x-nullable"] ?? false;
|
|
221
170
|
validationFunctions.push(...this.parse({ schemaObject: propertySchema, name: propertyName, parentName: name }));
|
|
222
171
|
validationFunctions.push({
|
|
223
|
-
keyword: schemaKeywords.name,
|
|
172
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.name,
|
|
224
173
|
args: propertyName
|
|
225
174
|
});
|
|
226
175
|
if (!isRequired && nullable) {
|
|
227
|
-
validationFunctions.push({ keyword: schemaKeywords.nullish });
|
|
176
|
+
validationFunctions.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.nullish });
|
|
228
177
|
} else if (!isRequired) {
|
|
229
|
-
validationFunctions.push({ keyword: schemaKeywords.optional });
|
|
178
|
+
validationFunctions.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.optional });
|
|
230
179
|
}
|
|
231
180
|
return {
|
|
232
181
|
[propertyName]: validationFunctions
|
|
@@ -238,7 +187,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
238
187
|
}
|
|
239
188
|
return [
|
|
240
189
|
{
|
|
241
|
-
keyword: schemaKeywords.object,
|
|
190
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.object,
|
|
242
191
|
args: {
|
|
243
192
|
properties: propertiesSchemas,
|
|
244
193
|
additionalProperties: additionalPropertiesSchemas
|
|
@@ -259,19 +208,19 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
259
208
|
if (key) {
|
|
260
209
|
return [
|
|
261
210
|
{
|
|
262
|
-
keyword: schemaKeywords.and,
|
|
211
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.and,
|
|
263
212
|
args: [
|
|
264
213
|
{
|
|
265
|
-
keyword: schemaKeywords.ref,
|
|
214
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.ref,
|
|
266
215
|
args: { name: ref.propertyName, $ref, path: ref.path, isImportable: !!this.context.oas.get($ref) }
|
|
267
216
|
},
|
|
268
217
|
{
|
|
269
|
-
keyword: schemaKeywords.object,
|
|
218
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.object,
|
|
270
219
|
args: {
|
|
271
220
|
properties: {
|
|
272
221
|
[dereferencedSchema.discriminator.propertyName]: [
|
|
273
222
|
{
|
|
274
|
-
keyword: schemaKeywords.const,
|
|
223
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.const,
|
|
275
224
|
args: {
|
|
276
225
|
name: key,
|
|
277
226
|
format: "string",
|
|
@@ -289,7 +238,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
289
238
|
}
|
|
290
239
|
return [
|
|
291
240
|
{
|
|
292
|
-
keyword: schemaKeywords.ref,
|
|
241
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.ref,
|
|
293
242
|
args: { name: ref.propertyName, $ref, path: ref.path, isImportable: !!this.context.oas.get($ref) }
|
|
294
243
|
}
|
|
295
244
|
];
|
|
@@ -325,47 +274,40 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
325
274
|
schemaObject,
|
|
326
275
|
discriminator
|
|
327
276
|
}) {
|
|
328
|
-
if (!isKeyword(schema, schemaKeywords.union)) {
|
|
277
|
+
if (!chunkYWMMI3MO_cjs.isKeyword(schema, chunkYWMMI3MO_cjs.schemaKeywords.union)) {
|
|
329
278
|
return schema;
|
|
330
279
|
}
|
|
331
|
-
const objectPropertySchema = _SchemaGenerator.find(this.parse({ schemaObject }), schemaKeywords.object);
|
|
280
|
+
const objectPropertySchema = _SchemaGenerator.find(this.parse({ schemaObject }), chunkYWMMI3MO_cjs.schemaKeywords.object);
|
|
332
281
|
return {
|
|
333
282
|
...schema,
|
|
334
|
-
args:
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
}
|
|
358
|
-
},
|
|
359
|
-
//enum and literal will conflict
|
|
360
|
-
...objectPropertySchema?.args?.properties[discriminator.propertyName] || []
|
|
361
|
-
].filter((item) => !isKeyword(item, schemaKeywords.enum))
|
|
362
|
-
}
|
|
283
|
+
args: Object.entries(discriminator.mapping || {}).map(([key, value]) => {
|
|
284
|
+
const arg = schema.args.find((item) => chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.ref) && item.args.$ref === value);
|
|
285
|
+
return {
|
|
286
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.and,
|
|
287
|
+
args: [
|
|
288
|
+
arg,
|
|
289
|
+
{
|
|
290
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.object,
|
|
291
|
+
args: {
|
|
292
|
+
properties: {
|
|
293
|
+
...objectPropertySchema?.args?.properties || {},
|
|
294
|
+
[discriminator.propertyName]: [
|
|
295
|
+
{
|
|
296
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.const,
|
|
297
|
+
args: {
|
|
298
|
+
name: key,
|
|
299
|
+
format: "string",
|
|
300
|
+
value: key
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
//enum and literal will conflict
|
|
304
|
+
...objectPropertySchema?.args?.properties[discriminator.propertyName] || []
|
|
305
|
+
].filter((item) => !chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.enum))
|
|
363
306
|
}
|
|
364
307
|
}
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}
|
|
368
|
-
return arg;
|
|
308
|
+
}
|
|
309
|
+
]
|
|
310
|
+
};
|
|
369
311
|
})
|
|
370
312
|
};
|
|
371
313
|
}
|
|
@@ -382,7 +324,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
382
324
|
}
|
|
383
325
|
const baseItems = [
|
|
384
326
|
{
|
|
385
|
-
keyword: schemaKeywords.schema,
|
|
327
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.schema,
|
|
386
328
|
args: {
|
|
387
329
|
type: schemaObject.type,
|
|
388
330
|
format: schemaObject.format
|
|
@@ -396,81 +338,81 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
396
338
|
if (schemaObject.default !== void 0 && !defaultNullAndNullable && !Array.isArray(schemaObject.default)) {
|
|
397
339
|
if (typeof schemaObject.default === "string") {
|
|
398
340
|
baseItems.push({
|
|
399
|
-
keyword: schemaKeywords.default,
|
|
341
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.default,
|
|
400
342
|
args: transformers__default.default.stringify(schemaObject.default)
|
|
401
343
|
});
|
|
402
344
|
} else if (typeof schemaObject.default === "boolean") {
|
|
403
345
|
baseItems.push({
|
|
404
|
-
keyword: schemaKeywords.default,
|
|
346
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.default,
|
|
405
347
|
args: schemaObject.default ?? false
|
|
406
348
|
});
|
|
407
349
|
} else {
|
|
408
350
|
baseItems.push({
|
|
409
|
-
keyword: schemaKeywords.default,
|
|
351
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.default,
|
|
410
352
|
args: schemaObject.default
|
|
411
353
|
});
|
|
412
354
|
}
|
|
413
355
|
}
|
|
414
356
|
if (schemaObject.deprecated) {
|
|
415
357
|
baseItems.push({
|
|
416
|
-
keyword: schemaKeywords.deprecated
|
|
358
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.deprecated
|
|
417
359
|
});
|
|
418
360
|
}
|
|
419
361
|
if (schemaObject.description) {
|
|
420
362
|
baseItems.push({
|
|
421
|
-
keyword: schemaKeywords.describe,
|
|
363
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.describe,
|
|
422
364
|
args: schemaObject.description
|
|
423
365
|
});
|
|
424
366
|
}
|
|
425
367
|
if (max !== void 0) {
|
|
426
|
-
baseItems.unshift({ keyword: schemaKeywords.max, args: max });
|
|
368
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.max, args: max });
|
|
427
369
|
}
|
|
428
370
|
if (min !== void 0) {
|
|
429
|
-
baseItems.unshift({ keyword: schemaKeywords.min, args: min });
|
|
371
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.min, args: min });
|
|
430
372
|
}
|
|
431
373
|
if (nullable) {
|
|
432
|
-
baseItems.push({ keyword: schemaKeywords.nullable });
|
|
374
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.nullable });
|
|
433
375
|
}
|
|
434
376
|
if (schemaObject.type && Array.isArray(schemaObject.type)) {
|
|
435
377
|
const items = schemaObject.type.filter((value) => value !== "null");
|
|
436
378
|
const hasNull = schemaObject.type.includes("null");
|
|
437
379
|
if (hasNull && !nullable) {
|
|
438
|
-
baseItems.push({ keyword: schemaKeywords.nullable });
|
|
380
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.nullable });
|
|
439
381
|
}
|
|
440
382
|
if (items.length > 1) {
|
|
441
383
|
const parsedItems = [
|
|
442
384
|
{
|
|
443
|
-
keyword: schemaKeywords.union,
|
|
385
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.union,
|
|
444
386
|
args: items.map(
|
|
445
387
|
(item) => this.parse({
|
|
446
388
|
schemaObject: { ...schemaObject, type: item },
|
|
447
389
|
name,
|
|
448
390
|
parentName
|
|
449
391
|
})[0]
|
|
450
|
-
).filter(Boolean).filter((item) => !isKeyword(item, schemaKeywords.unknown)).map((item) => isKeyword(item, schemaKeywords.object) ? { ...item, args: { ...item.args, strict: true } } : item)
|
|
392
|
+
).filter(Boolean).filter((item) => !chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.unknown)).map((item) => chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.object) ? { ...item, args: { ...item.args, strict: true } } : item)
|
|
451
393
|
}
|
|
452
394
|
];
|
|
453
395
|
return [...parsedItems, ...baseItems].filter(Boolean);
|
|
454
396
|
}
|
|
455
397
|
}
|
|
456
398
|
if (schemaObject.readOnly) {
|
|
457
|
-
baseItems.push({ keyword: schemaKeywords.readOnly });
|
|
399
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.readOnly });
|
|
458
400
|
}
|
|
459
401
|
if (schemaObject.writeOnly) {
|
|
460
|
-
baseItems.push({ keyword: schemaKeywords.writeOnly });
|
|
402
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.writeOnly });
|
|
461
403
|
}
|
|
462
404
|
if (oas.isReference(schemaObject)) {
|
|
463
405
|
return [
|
|
464
406
|
...this.#getRefAlias(schemaObject, name),
|
|
465
407
|
schemaObject.description && {
|
|
466
|
-
keyword: schemaKeywords.describe,
|
|
408
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.describe,
|
|
467
409
|
args: schemaObject.description
|
|
468
410
|
},
|
|
469
|
-
nullable && { keyword: schemaKeywords.nullable },
|
|
470
|
-
schemaObject.readOnly && { keyword: schemaKeywords.readOnly },
|
|
471
|
-
schemaObject.writeOnly && { keyword: schemaKeywords.writeOnly },
|
|
411
|
+
nullable && { keyword: chunkYWMMI3MO_cjs.schemaKeywords.nullable },
|
|
412
|
+
schemaObject.readOnly && { keyword: chunkYWMMI3MO_cjs.schemaKeywords.readOnly },
|
|
413
|
+
schemaObject.writeOnly && { keyword: chunkYWMMI3MO_cjs.schemaKeywords.writeOnly },
|
|
472
414
|
{
|
|
473
|
-
keyword: schemaKeywords.schema,
|
|
415
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.schema,
|
|
474
416
|
args: {
|
|
475
417
|
type: schemaObject.type,
|
|
476
418
|
format: schemaObject.format
|
|
@@ -480,13 +422,13 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
480
422
|
}
|
|
481
423
|
if (schemaObject.oneOf) {
|
|
482
424
|
const schemaWithoutOneOf = { ...schemaObject, oneOf: void 0 };
|
|
425
|
+
const discriminator = this.context.oas.getDiscriminator(schemaObject);
|
|
483
426
|
const union = {
|
|
484
|
-
keyword: schemaKeywords.union,
|
|
427
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.union,
|
|
485
428
|
args: schemaObject.oneOf.map((item) => {
|
|
486
429
|
return item && this.parse({ schemaObject: item, name, parentName })[0];
|
|
487
|
-
}).filter(Boolean).filter((item) => !isKeyword(item, schemaKeywords.unknown))
|
|
430
|
+
}).filter(Boolean).filter((item) => !chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.unknown))
|
|
488
431
|
};
|
|
489
|
-
const discriminator = this.context.oas.getDiscriminator(schemaObject);
|
|
490
432
|
if (discriminator) {
|
|
491
433
|
return [this.#addDiscriminatorToSchema({ schemaObject: schemaWithoutOneOf, schema: union, discriminator }), ...baseItems];
|
|
492
434
|
}
|
|
@@ -495,7 +437,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
495
437
|
union.args = [
|
|
496
438
|
...union.args.map((arg) => {
|
|
497
439
|
return {
|
|
498
|
-
keyword: schemaKeywords.and,
|
|
440
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.and,
|
|
499
441
|
args: [arg, ...propertySchemas]
|
|
500
442
|
};
|
|
501
443
|
})
|
|
@@ -507,11 +449,11 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
507
449
|
if (schemaObject.anyOf) {
|
|
508
450
|
const schemaWithoutAnyOf = { ...schemaObject, anyOf: void 0 };
|
|
509
451
|
const union = {
|
|
510
|
-
keyword: schemaKeywords.union,
|
|
452
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.union,
|
|
511
453
|
args: schemaObject.anyOf.map((item) => {
|
|
512
454
|
return item && this.parse({ schemaObject: item, name, parentName })[0];
|
|
513
|
-
}).filter(Boolean).filter((item) => !isKeyword(item, schemaKeywords.unknown)).map((item) => {
|
|
514
|
-
if (isKeyword(item, schemaKeywords.object)) {
|
|
455
|
+
}).filter(Boolean).filter((item) => !chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.unknown)).map((item) => {
|
|
456
|
+
if (chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.object)) {
|
|
515
457
|
return {
|
|
516
458
|
...item,
|
|
517
459
|
args: {
|
|
@@ -532,7 +474,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
532
474
|
union.args = [
|
|
533
475
|
...union.args.map((arg) => {
|
|
534
476
|
return {
|
|
535
|
-
keyword: schemaKeywords.and,
|
|
477
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.and,
|
|
536
478
|
args: [arg, ...propertySchemas]
|
|
537
479
|
};
|
|
538
480
|
})
|
|
@@ -544,10 +486,10 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
544
486
|
if (schemaObject.allOf) {
|
|
545
487
|
const schemaWithoutAllOf = { ...schemaObject, allOf: void 0 };
|
|
546
488
|
const and = {
|
|
547
|
-
keyword: schemaKeywords.and,
|
|
489
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.and,
|
|
548
490
|
args: schemaObject.allOf.map((item) => {
|
|
549
491
|
return item && this.parse({ schemaObject: item, name, parentName })[0];
|
|
550
|
-
}).filter(Boolean).filter((item) => !isKeyword(item, schemaKeywords.unknown))
|
|
492
|
+
}).filter(Boolean).filter((item) => !chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.unknown))
|
|
551
493
|
};
|
|
552
494
|
if (schemaWithoutAllOf.required) {
|
|
553
495
|
const schemas = schemaObject.allOf.map((item) => {
|
|
@@ -591,13 +533,13 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
591
533
|
});
|
|
592
534
|
const nullableEnum = schemaObject.enum.includes(null);
|
|
593
535
|
if (nullableEnum) {
|
|
594
|
-
baseItems.push({ keyword: schemaKeywords.nullable });
|
|
536
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.nullable });
|
|
595
537
|
}
|
|
596
538
|
const filteredValues = schemaObject.enum.filter((value) => value !== null);
|
|
597
539
|
const extensionEnums = ["x-enumNames", "x-enum-varnames"].filter((extensionKey) => extensionKey in schemaObject).map((extensionKey) => {
|
|
598
540
|
return [
|
|
599
541
|
{
|
|
600
|
-
keyword: schemaKeywords.enum,
|
|
542
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.enum,
|
|
601
543
|
args: {
|
|
602
544
|
name,
|
|
603
545
|
typeName,
|
|
@@ -610,15 +552,15 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
610
552
|
}
|
|
611
553
|
},
|
|
612
554
|
...baseItems.filter(
|
|
613
|
-
(item) => item.keyword !== schemaKeywords.min && item.keyword !== schemaKeywords.max && item.keyword !== schemaKeywords.matches
|
|
555
|
+
(item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.min && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.max && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.matches
|
|
614
556
|
)
|
|
615
557
|
];
|
|
616
558
|
});
|
|
617
559
|
if (schemaObject.type === "number" || schemaObject.type === "integer") {
|
|
618
|
-
const enumNames = extensionEnums[0]?.find((item) => isKeyword(item, schemaKeywords.enum));
|
|
560
|
+
const enumNames = extensionEnums[0]?.find((item) => chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.enum));
|
|
619
561
|
return [
|
|
620
562
|
{
|
|
621
|
-
keyword: schemaKeywords.enum,
|
|
563
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.enum,
|
|
622
564
|
args: {
|
|
623
565
|
name: enumName,
|
|
624
566
|
typeName,
|
|
@@ -636,14 +578,14 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
636
578
|
})
|
|
637
579
|
}
|
|
638
580
|
},
|
|
639
|
-
...baseItems.filter((item) => item.keyword !== schemaKeywords.min && item.keyword !== schemaKeywords.max && item.keyword !== schemaKeywords.matches)
|
|
581
|
+
...baseItems.filter((item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.min && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.max && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.matches)
|
|
640
582
|
];
|
|
641
583
|
}
|
|
642
584
|
if (schemaObject.type === "boolean") {
|
|
643
|
-
const enumNames = extensionEnums[0]?.find((item) => isKeyword(item, schemaKeywords.enum));
|
|
585
|
+
const enumNames = extensionEnums[0]?.find((item) => chunkYWMMI3MO_cjs.isKeyword(item, chunkYWMMI3MO_cjs.schemaKeywords.enum));
|
|
644
586
|
return [
|
|
645
587
|
{
|
|
646
|
-
keyword: schemaKeywords.enum,
|
|
588
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.enum,
|
|
647
589
|
args: {
|
|
648
590
|
name: enumName,
|
|
649
591
|
typeName,
|
|
@@ -661,7 +603,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
661
603
|
})
|
|
662
604
|
}
|
|
663
605
|
},
|
|
664
|
-
...baseItems.filter((item) => item.keyword !== schemaKeywords.matches)
|
|
606
|
+
...baseItems.filter((item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.matches)
|
|
665
607
|
];
|
|
666
608
|
}
|
|
667
609
|
if (extensionEnums.length > 0 && extensionEnums[0]) {
|
|
@@ -669,7 +611,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
669
611
|
}
|
|
670
612
|
return [
|
|
671
613
|
{
|
|
672
|
-
keyword: schemaKeywords.enum,
|
|
614
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.enum,
|
|
673
615
|
args: {
|
|
674
616
|
name: enumName,
|
|
675
617
|
typeName,
|
|
@@ -681,7 +623,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
681
623
|
}))
|
|
682
624
|
}
|
|
683
625
|
},
|
|
684
|
-
...baseItems.filter((item) => item.keyword !== schemaKeywords.min && item.keyword !== schemaKeywords.max && item.keyword !== schemaKeywords.matches)
|
|
626
|
+
...baseItems.filter((item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.min && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.max && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.matches)
|
|
685
627
|
];
|
|
686
628
|
}
|
|
687
629
|
if ("prefixItems" in schemaObject) {
|
|
@@ -691,7 +633,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
691
633
|
const max2 = schemaObject.maximum ?? schemaObject.maxLength ?? schemaObject.maxItems ?? void 0;
|
|
692
634
|
return [
|
|
693
635
|
{
|
|
694
|
-
keyword: schemaKeywords.tuple,
|
|
636
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.tuple,
|
|
695
637
|
args: {
|
|
696
638
|
min: min2,
|
|
697
639
|
max: max2,
|
|
@@ -705,14 +647,14 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
705
647
|
})[0]
|
|
706
648
|
}
|
|
707
649
|
},
|
|
708
|
-
...baseItems.filter((item) => item.keyword !== schemaKeywords.min && item.keyword !== schemaKeywords.max)
|
|
650
|
+
...baseItems.filter((item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.min && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.max)
|
|
709
651
|
];
|
|
710
652
|
}
|
|
711
653
|
if (version === "3.1" && "const" in schemaObject) {
|
|
712
654
|
if (schemaObject["const"]) {
|
|
713
655
|
return [
|
|
714
656
|
{
|
|
715
|
-
keyword: schemaKeywords.const,
|
|
657
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.const,
|
|
716
658
|
args: {
|
|
717
659
|
name: schemaObject["const"],
|
|
718
660
|
format: typeof schemaObject["const"] === "number" ? "number" : "string",
|
|
@@ -722,65 +664,65 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
722
664
|
...baseItems
|
|
723
665
|
];
|
|
724
666
|
}
|
|
725
|
-
return [{ keyword: schemaKeywords.null }];
|
|
667
|
+
return [{ keyword: chunkYWMMI3MO_cjs.schemaKeywords.null }];
|
|
726
668
|
}
|
|
727
669
|
if (schemaObject.format) {
|
|
728
670
|
if (schemaObject.type === "integer" && (schemaObject.format === "int32" || schemaObject.format === "int64")) {
|
|
729
|
-
baseItems.unshift({ keyword: schemaKeywords.integer });
|
|
671
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.integer });
|
|
730
672
|
return baseItems;
|
|
731
673
|
}
|
|
732
674
|
if (schemaObject.type === "number" && (schemaObject.format === "float" || schemaObject.format === "double")) {
|
|
733
|
-
baseItems.unshift({ keyword: schemaKeywords.number });
|
|
675
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.number });
|
|
734
676
|
return baseItems;
|
|
735
677
|
}
|
|
736
678
|
switch (schemaObject.format) {
|
|
737
679
|
case "binary":
|
|
738
|
-
baseItems.push({ keyword: schemaKeywords.blob });
|
|
680
|
+
baseItems.push({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.blob });
|
|
739
681
|
return baseItems;
|
|
740
682
|
case "date-time":
|
|
741
683
|
if (options.dateType) {
|
|
742
684
|
if (options.dateType === "date") {
|
|
743
|
-
baseItems.unshift({ keyword: schemaKeywords.date, args: { type: "date" } });
|
|
685
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.date, args: { type: "date" } });
|
|
744
686
|
return baseItems;
|
|
745
687
|
}
|
|
746
688
|
if (options.dateType === "stringOffset") {
|
|
747
|
-
baseItems.unshift({ keyword: schemaKeywords.datetime, args: { offset: true } });
|
|
689
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.datetime, args: { offset: true } });
|
|
748
690
|
return baseItems;
|
|
749
691
|
}
|
|
750
692
|
if (options.dateType === "stringLocal") {
|
|
751
|
-
baseItems.unshift({ keyword: schemaKeywords.datetime, args: { local: true } });
|
|
693
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.datetime, args: { local: true } });
|
|
752
694
|
return baseItems;
|
|
753
695
|
}
|
|
754
|
-
baseItems.unshift({ keyword: schemaKeywords.datetime, args: { offset: false } });
|
|
696
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.datetime, args: { offset: false } });
|
|
755
697
|
return baseItems;
|
|
756
698
|
}
|
|
757
699
|
break;
|
|
758
700
|
case "date":
|
|
759
701
|
if (options.dateType) {
|
|
760
702
|
if (options.dateType === "date") {
|
|
761
|
-
baseItems.unshift({ keyword: schemaKeywords.date, args: { type: "date" } });
|
|
703
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.date, args: { type: "date" } });
|
|
762
704
|
return baseItems;
|
|
763
705
|
}
|
|
764
|
-
baseItems.unshift({ keyword: schemaKeywords.date, args: { type: "string" } });
|
|
706
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.date, args: { type: "string" } });
|
|
765
707
|
return baseItems;
|
|
766
708
|
}
|
|
767
709
|
break;
|
|
768
710
|
case "time":
|
|
769
711
|
if (options.dateType) {
|
|
770
712
|
if (options.dateType === "date") {
|
|
771
|
-
baseItems.unshift({ keyword: schemaKeywords.time, args: { type: "date" } });
|
|
713
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.time, args: { type: "date" } });
|
|
772
714
|
return baseItems;
|
|
773
715
|
}
|
|
774
|
-
baseItems.unshift({ keyword: schemaKeywords.time, args: { type: "string" } });
|
|
716
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.time, args: { type: "string" } });
|
|
775
717
|
return baseItems;
|
|
776
718
|
}
|
|
777
719
|
break;
|
|
778
720
|
case "uuid":
|
|
779
|
-
baseItems.unshift({ keyword: schemaKeywords.uuid });
|
|
721
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.uuid });
|
|
780
722
|
return baseItems;
|
|
781
723
|
case "email":
|
|
782
724
|
case "idn-email":
|
|
783
|
-
baseItems.unshift({ keyword: schemaKeywords.email });
|
|
725
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.email });
|
|
784
726
|
return baseItems;
|
|
785
727
|
case "uri":
|
|
786
728
|
case "ipv4":
|
|
@@ -788,13 +730,13 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
788
730
|
case "uri-reference":
|
|
789
731
|
case "hostname":
|
|
790
732
|
case "idn-hostname":
|
|
791
|
-
baseItems.unshift({ keyword: schemaKeywords.url });
|
|
733
|
+
baseItems.unshift({ keyword: chunkYWMMI3MO_cjs.schemaKeywords.url });
|
|
792
734
|
return baseItems;
|
|
793
735
|
}
|
|
794
736
|
}
|
|
795
737
|
if (schemaObject.pattern && schemaObject.type === "string") {
|
|
796
738
|
baseItems.unshift({
|
|
797
|
-
keyword: schemaKeywords.matches,
|
|
739
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.matches,
|
|
798
740
|
args: schemaObject.pattern
|
|
799
741
|
});
|
|
800
742
|
return baseItems;
|
|
@@ -806,7 +748,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
806
748
|
const unique = !!schemaObject.uniqueItems;
|
|
807
749
|
return [
|
|
808
750
|
{
|
|
809
|
-
keyword: schemaKeywords.array,
|
|
751
|
+
keyword: chunkYWMMI3MO_cjs.schemaKeywords.array,
|
|
810
752
|
args: {
|
|
811
753
|
items,
|
|
812
754
|
min: min2,
|
|
@@ -814,7 +756,7 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
814
756
|
unique
|
|
815
757
|
}
|
|
816
758
|
},
|
|
817
|
-
...baseItems.filter((item) => item.keyword !== schemaKeywords.min && item.keyword !== schemaKeywords.max)
|
|
759
|
+
...baseItems.filter((item) => item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.min && item.keyword !== chunkYWMMI3MO_cjs.schemaKeywords.max)
|
|
818
760
|
];
|
|
819
761
|
}
|
|
820
762
|
if (schemaObject.properties || schemaObject.additionalProperties) {
|
|
@@ -900,7 +842,5 @@ var SchemaGenerator = class _SchemaGenerator extends core.BaseGenerator {
|
|
|
900
842
|
};
|
|
901
843
|
|
|
902
844
|
exports.SchemaGenerator = SchemaGenerator;
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
//# sourceMappingURL=chunk-7U6BHIOO.cjs.map
|
|
906
|
-
//# sourceMappingURL=chunk-7U6BHIOO.cjs.map
|
|
845
|
+
//# sourceMappingURL=chunk-WAB2O4DX.cjs.map
|
|
846
|
+
//# sourceMappingURL=chunk-WAB2O4DX.cjs.map
|