@kubb/plugin-oas 4.32.0 → 4.32.1

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.
Files changed (48) hide show
  1. package/dist/{SchemaMapper-CMGlwm4l.cjs → SchemaMapper-CEvL7_hg.cjs} +13 -14
  2. package/dist/{SchemaMapper-CMGlwm4l.cjs.map → SchemaMapper-CEvL7_hg.cjs.map} +1 -1
  3. package/dist/{SchemaMapper-eQhTeFim.js → SchemaMapper-ClUmzpCc.js} +3 -4
  4. package/dist/{SchemaMapper-eQhTeFim.js.map → SchemaMapper-ClUmzpCc.js.map} +1 -1
  5. package/dist/{SchemaMapper-qCyrgyL3.d.ts → SchemaMapper-SneuY1wg.d.ts} +2 -2
  6. package/dist/{chunk-DKWOrOAv.js → chunk--u3MIqq1.js} +1 -2
  7. package/dist/{chunk-CNbaEX1y.cjs → chunk-ByKO4r7w.cjs} +17 -23
  8. package/dist/{createGenerator-B_BiBP6b.d.ts → createGenerator-BPVBbTHR.d.ts} +3 -3
  9. package/dist/{jsonGenerator-Df2dxdof.js → generators-BrYP9z4D.js} +4 -7
  10. package/dist/generators-BrYP9z4D.js.map +1 -0
  11. package/dist/{jsonGenerator-Bp0EufGu.cjs → generators-BvfaSMp3.cjs} +19 -22
  12. package/dist/generators-BvfaSMp3.cjs.map +1 -0
  13. package/dist/generators.cjs +5 -6
  14. package/dist/generators.d.ts +2 -2
  15. package/dist/generators.js +2 -3
  16. package/dist/{getFooter-_DD1dfMI.js → getFooter-DGVGGyRc.js} +3 -5
  17. package/dist/{getFooter-_DD1dfMI.js.map → getFooter-DGVGGyRc.js.map} +1 -1
  18. package/dist/{getFooter-C_SMPaho.cjs → getFooter-WAZDOcmk.cjs} +13 -15
  19. package/dist/{getFooter-C_SMPaho.cjs.map → getFooter-WAZDOcmk.cjs.map} +1 -1
  20. package/dist/hooks.cjs +3 -6
  21. package/dist/hooks.cjs.map +1 -1
  22. package/dist/hooks.d.ts +2 -2
  23. package/dist/hooks.js +2 -5
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.cjs +9 -13
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.ts +3 -3
  28. package/dist/index.js +5 -9
  29. package/dist/index.js.map +1 -1
  30. package/dist/mocks.cjs +764 -768
  31. package/dist/mocks.cjs.map +1 -1
  32. package/dist/mocks.d.ts +2 -2
  33. package/dist/mocks.js +763 -767
  34. package/dist/mocks.js.map +1 -1
  35. package/dist/{resolveServerUrl--_ZvUrB1.cjs → resolveServerUrl-CxAWmztf.cjs} +49 -56
  36. package/dist/{resolveServerUrl--_ZvUrB1.cjs.map → resolveServerUrl-CxAWmztf.cjs.map} +1 -1
  37. package/dist/{resolveServerUrl-D-P-Dovy.js → resolveServerUrl-sGGjx0hA.js} +4 -11
  38. package/dist/{resolveServerUrl-D-P-Dovy.js.map → resolveServerUrl-sGGjx0hA.js.map} +1 -1
  39. package/dist/utils.cjs +11 -16
  40. package/dist/utils.cjs.map +1 -1
  41. package/dist/utils.d.ts +3 -3
  42. package/dist/utils.js +5 -10
  43. package/dist/utils.js.map +1 -1
  44. package/package.json +7 -3
  45. package/src/plugin.ts +4 -1
  46. package/src/utils/resolveServerUrl.ts +1 -3
  47. package/dist/jsonGenerator-Bp0EufGu.cjs.map +0 -1
  48. package/dist/jsonGenerator-Df2dxdof.js.map +0 -1
package/dist/mocks.js CHANGED
@@ -1,737 +1,416 @@
1
- import { n as schemaKeywords } from "./SchemaMapper-eQhTeFim.js";
2
-
3
- //#region src/mocks/schemas.ts
4
- const basic = [
5
- {
6
- name: "any",
7
- schema: { keyword: schemaKeywords.any }
8
- },
9
- {
10
- name: "unknown",
11
- schema: { keyword: schemaKeywords.unknown }
12
- },
13
- {
14
- name: "string",
15
- schema: { keyword: schemaKeywords.string }
16
- },
17
- {
18
- name: "number",
19
- schema: { keyword: schemaKeywords.number }
20
- },
21
- {
22
- name: "integer",
23
- schema: { keyword: schemaKeywords.integer }
24
- },
25
- {
26
- name: "boolean",
27
- schema: { keyword: schemaKeywords.boolean }
28
- },
29
- {
30
- name: "primitiveDate",
31
- schema: {
32
- keyword: schemaKeywords.date,
33
- args: { type: "date" }
34
- }
35
- },
36
- {
37
- name: "date",
38
- schema: {
39
- keyword: schemaKeywords.date,
40
- args: { type: "string" }
41
- }
42
- },
43
- {
44
- name: "time",
45
- schema: {
46
- keyword: schemaKeywords.time,
47
- args: { type: "string" }
48
- }
49
- },
50
- {
51
- name: "stringOffset",
52
- schema: {
53
- keyword: schemaKeywords.datetime,
54
- args: { offset: true }
55
- }
56
- },
57
- {
58
- name: "stringLocal",
59
- schema: {
60
- keyword: schemaKeywords.datetime,
61
- args: { local: true }
62
- }
63
- },
64
- {
65
- name: "datetime",
66
- schema: {
67
- keyword: schemaKeywords.datetime,
68
- args: { offset: false }
69
- }
70
- },
71
- {
72
- name: "nullable",
73
- schema: { keyword: schemaKeywords.nullable }
74
- },
75
- {
76
- name: "undefined",
77
- schema: { keyword: schemaKeywords.undefined }
78
- },
79
- {
80
- name: "min",
81
- schema: {
82
- keyword: schemaKeywords.min,
83
- args: 2
84
- }
85
- },
86
- {
87
- name: "max",
88
- schema: {
89
- keyword: schemaKeywords.max,
90
- args: 2
91
- }
92
- },
93
- {
94
- name: "matchesReg",
95
- schema: {
96
- keyword: schemaKeywords.matches,
97
- args: "/node_modules/"
98
- }
99
- },
100
- {
101
- name: "matches",
102
- schema: {
103
- keyword: schemaKeywords.matches,
104
- args: "^[A-Z]{2}$"
105
- }
106
- },
107
- {
108
- name: "const",
109
- schema: {
110
- keyword: schemaKeywords.const,
111
- args: {
112
- name: "",
113
- value: "",
114
- format: schemaKeywords.string
1
+ import { n as schemaKeywords } from "./SchemaMapper-ClUmzpCc.js";
2
+ const schemas = {
3
+ basic: [
4
+ {
5
+ name: "any",
6
+ schema: { keyword: schemaKeywords.any }
7
+ },
8
+ {
9
+ name: "unknown",
10
+ schema: { keyword: schemaKeywords.unknown }
11
+ },
12
+ {
13
+ name: "string",
14
+ schema: { keyword: schemaKeywords.string }
15
+ },
16
+ {
17
+ name: "number",
18
+ schema: { keyword: schemaKeywords.number }
19
+ },
20
+ {
21
+ name: "integer",
22
+ schema: { keyword: schemaKeywords.integer }
23
+ },
24
+ {
25
+ name: "boolean",
26
+ schema: { keyword: schemaKeywords.boolean }
27
+ },
28
+ {
29
+ name: "primitiveDate",
30
+ schema: {
31
+ keyword: schemaKeywords.date,
32
+ args: { type: "date" }
115
33
  }
116
- }
117
- },
118
- {
119
- name: "ref",
120
- schema: {
121
- keyword: schemaKeywords.ref,
122
- args: {
123
- $ref: "$ref",
124
- name: "Pet",
125
- path: "./pet.ts",
126
- isImportable: true
34
+ },
35
+ {
36
+ name: "date",
37
+ schema: {
38
+ keyword: schemaKeywords.date,
39
+ args: { type: "string" }
127
40
  }
128
- }
129
- },
130
- {
131
- name: "enum",
132
- schema: {
133
- keyword: schemaKeywords.enum,
134
- args: {
135
- name: "enum",
136
- typeName: "Enum",
137
- asConst: false,
138
- items: [
139
- {
140
- name: "A",
141
- value: "A",
142
- format: schemaKeywords.string
143
- },
144
- {
145
- name: "B",
146
- value: "B",
147
- format: schemaKeywords.string
148
- },
149
- {
150
- name: "C",
151
- value: "C",
152
- format: schemaKeywords.string
153
- },
154
- {
155
- name: 2,
156
- value: 2,
157
- format: schemaKeywords.number
158
- }
159
- ]
41
+ },
42
+ {
43
+ name: "time",
44
+ schema: {
45
+ keyword: schemaKeywords.time,
46
+ args: { type: "string" }
160
47
  }
161
- }
162
- },
163
- {
164
- name: "enumLiteralBoolean",
165
- schema: {
166
- keyword: schemaKeywords.enum,
167
- args: {
168
- asConst: true,
169
- items: [{
170
- format: "boolean",
171
- name: "true",
172
- value: true
173
- }, {
174
- format: "boolean",
175
- name: "false",
176
- value: false
177
- }],
178
- name: "PetEnumLiteral",
179
- typeName: "PetEnumLiteral"
48
+ },
49
+ {
50
+ name: "stringOffset",
51
+ schema: {
52
+ keyword: schemaKeywords.datetime,
53
+ args: { offset: true }
180
54
  }
181
- }
182
- },
183
- {
184
- name: "tuple",
185
- schema: {
186
- keyword: schemaKeywords.tuple,
187
- args: { items: [] }
188
- }
189
- },
190
- {
191
- name: "tupleMulti",
192
- schema: {
193
- keyword: schemaKeywords.tuple,
194
- args: { items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }] }
195
- }
196
- },
197
- {
198
- name: "array",
199
- schema: {
200
- keyword: schemaKeywords.array,
201
- args: { items: [{
202
- keyword: schemaKeywords.union,
203
- args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }]
204
- }] }
205
- }
206
- },
207
- {
208
- name: "arrayEmpty",
209
- schema: {
210
- keyword: schemaKeywords.array,
211
- args: { items: [] }
212
- }
213
- },
214
- {
215
- name: "arrayRef",
216
- schema: {
217
- keyword: schemaKeywords.array,
218
- args: { items: [{
55
+ },
56
+ {
57
+ name: "stringLocal",
58
+ schema: {
59
+ keyword: schemaKeywords.datetime,
60
+ args: { local: true }
61
+ }
62
+ },
63
+ {
64
+ name: "datetime",
65
+ schema: {
66
+ keyword: schemaKeywords.datetime,
67
+ args: { offset: false }
68
+ }
69
+ },
70
+ {
71
+ name: "nullable",
72
+ schema: { keyword: schemaKeywords.nullable }
73
+ },
74
+ {
75
+ name: "undefined",
76
+ schema: { keyword: schemaKeywords.undefined }
77
+ },
78
+ {
79
+ name: "min",
80
+ schema: {
81
+ keyword: schemaKeywords.min,
82
+ args: 2
83
+ }
84
+ },
85
+ {
86
+ name: "max",
87
+ schema: {
88
+ keyword: schemaKeywords.max,
89
+ args: 2
90
+ }
91
+ },
92
+ {
93
+ name: "matchesReg",
94
+ schema: {
95
+ keyword: schemaKeywords.matches,
96
+ args: "/node_modules/"
97
+ }
98
+ },
99
+ {
100
+ name: "matches",
101
+ schema: {
102
+ keyword: schemaKeywords.matches,
103
+ args: "^[A-Z]{2}$"
104
+ }
105
+ },
106
+ {
107
+ name: "const",
108
+ schema: {
109
+ keyword: schemaKeywords.const,
110
+ args: {
111
+ name: "",
112
+ value: "",
113
+ format: schemaKeywords.string
114
+ }
115
+ }
116
+ },
117
+ {
118
+ name: "ref",
119
+ schema: {
219
120
  keyword: schemaKeywords.ref,
220
121
  args: {
122
+ $ref: "$ref",
221
123
  name: "Pet",
222
- $ref: "#component/schema/Pet",
223
124
  path: "./pet.ts",
224
125
  isImportable: true
225
126
  }
226
- }] }
227
- }
228
- },
229
- {
230
- name: "arrayAdvanced",
231
- schema: {
232
- keyword: schemaKeywords.array,
233
- args: {
234
- items: [
235
- {
236
- keyword: schemaKeywords.min,
237
- args: 1
238
- },
239
- {
240
- keyword: schemaKeywords.max,
241
- args: 10
242
- },
243
- { keyword: schemaKeywords.number }
244
- ],
245
- min: 3,
246
- max: 10
247
- }
248
- }
249
- },
250
- {
251
- name: "arrayRegex",
252
- schema: {
253
- keyword: schemaKeywords.array,
254
- args: {
255
- items: [{
256
- keyword: schemaKeywords.matches,
257
- args: "^[a-zA-Z0-9]{1,13}$"
258
- }],
259
- min: 3,
260
- max: 10
261
127
  }
262
- }
263
- },
264
- {
265
- name: "union",
266
- schema: {
267
- keyword: schemaKeywords.union,
268
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }]
269
- }
270
- },
271
- {
272
- name: "unionOne",
273
- schema: {
274
- keyword: schemaKeywords.union,
275
- args: [{ keyword: schemaKeywords.string }]
276
- }
277
- },
278
- {
279
- name: "catchall",
280
- schema: {
281
- keyword: schemaKeywords.object,
282
- args: {
283
- properties: {},
284
- additionalProperties: [{
285
- keyword: schemaKeywords.ref,
286
- args: {
287
- name: "Pet",
288
- $ref: "#component/schema/Pet",
289
- path: "./Pet.ts",
290
- isImportable: true
291
- }
292
- }]
293
- }
294
- }
295
- },
296
- {
297
- name: "and",
298
- schema: {
299
- keyword: schemaKeywords.and,
300
- args: [{
301
- keyword: schemaKeywords.object,
128
+ },
129
+ {
130
+ name: "enum",
131
+ schema: {
132
+ keyword: schemaKeywords.enum,
302
133
  args: {
303
- properties: { street: [{ keyword: schemaKeywords.string }] },
304
- additionalProperties: []
305
- }
306
- }, {
307
- keyword: schemaKeywords.object,
308
- args: {
309
- properties: { city: [{ keyword: schemaKeywords.string }] },
310
- additionalProperties: []
311
- }
312
- }]
313
- }
314
- },
315
- {
316
- name: "object",
317
- schema: {
318
- keyword: schemaKeywords.object,
319
- args: {
320
- properties: {
321
- firstName: [{ keyword: schemaKeywords.string }, {
322
- keyword: schemaKeywords.min,
323
- args: 2
324
- }],
325
- address: [
326
- { keyword: schemaKeywords.string },
327
- { keyword: schemaKeywords.nullable },
134
+ name: "enum",
135
+ typeName: "Enum",
136
+ asConst: false,
137
+ items: [
328
138
  {
329
- keyword: schemaKeywords.describe,
330
- args: "\"Your address\""
331
- }
332
- ]
333
- },
334
- additionalProperties: []
335
- }
336
- }
337
- },
338
- {
339
- name: "objectOptional",
340
- schema: {
341
- keyword: schemaKeywords.object,
342
- args: {
343
- properties: {
344
- firstName: [
345
- { keyword: schemaKeywords.string },
346
- { keyword: schemaKeywords.optional },
139
+ name: "A",
140
+ value: "A",
141
+ format: schemaKeywords.string
142
+ },
347
143
  {
348
- keyword: schemaKeywords.min,
349
- args: 2
350
- }
351
- ],
352
- address: [
353
- { keyword: schemaKeywords.string },
354
- { keyword: schemaKeywords.nullable },
144
+ name: "B",
145
+ value: "B",
146
+ format: schemaKeywords.string
147
+ },
355
148
  {
356
- keyword: schemaKeywords.describe,
357
- args: "\"Your address\""
149
+ name: "C",
150
+ value: "C",
151
+ format: schemaKeywords.string
152
+ },
153
+ {
154
+ name: 2,
155
+ value: 2,
156
+ format: schemaKeywords.number
358
157
  }
359
158
  ]
360
- },
361
- additionalProperties: []
159
+ }
362
160
  }
363
- }
364
- },
365
- {
366
- name: "objectArray",
367
- schema: {
368
- keyword: schemaKeywords.object,
369
- args: {
370
- properties: { ids: [{
371
- keyword: schemaKeywords.array,
161
+ },
162
+ {
163
+ name: "enumLiteralBoolean",
164
+ schema: {
165
+ keyword: schemaKeywords.enum,
166
+ args: {
167
+ asConst: true,
168
+ items: [{
169
+ format: "boolean",
170
+ name: "true",
171
+ value: true
172
+ }, {
173
+ format: "boolean",
174
+ name: "false",
175
+ value: false
176
+ }],
177
+ name: "PetEnumLiteral",
178
+ typeName: "PetEnumLiteral"
179
+ }
180
+ }
181
+ },
182
+ {
183
+ name: "tuple",
184
+ schema: {
185
+ keyword: schemaKeywords.tuple,
186
+ args: { items: [] }
187
+ }
188
+ },
189
+ {
190
+ name: "tupleMulti",
191
+ schema: {
192
+ keyword: schemaKeywords.tuple,
193
+ args: { items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }] }
194
+ }
195
+ },
196
+ {
197
+ name: "array",
198
+ schema: {
199
+ keyword: schemaKeywords.array,
200
+ args: { items: [{
201
+ keyword: schemaKeywords.union,
202
+ args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }]
203
+ }] }
204
+ }
205
+ },
206
+ {
207
+ name: "arrayEmpty",
208
+ schema: {
209
+ keyword: schemaKeywords.array,
210
+ args: { items: [] }
211
+ }
212
+ },
213
+ {
214
+ name: "arrayRef",
215
+ schema: {
216
+ keyword: schemaKeywords.array,
217
+ args: { items: [{
218
+ keyword: schemaKeywords.ref,
372
219
  args: {
373
- items: [{
374
- keyword: schemaKeywords.matches,
375
- args: "^[a-zA-Z0-9]{1,13}$"
376
- }],
377
- min: 3,
378
- max: 10
220
+ name: "Pet",
221
+ $ref: "#component/schema/Pet",
222
+ path: "./pet.ts",
223
+ isImportable: true
379
224
  }
380
- }] },
381
- additionalProperties: []
382
- }
383
- }
384
- },
385
- {
386
- name: "objectDates",
387
- schema: {
388
- keyword: schemaKeywords.object,
389
- args: {
390
- properties: {
391
- dateTime: [{
392
- keyword: schemaKeywords.datetime,
393
- args: { offset: true }
394
- }],
395
- date: [{
396
- keyword: schemaKeywords.date,
397
- args: { type: "string" }
398
- }],
399
- time: [{
400
- keyword: schemaKeywords.time,
401
- args: { type: "string" }
402
- }],
403
- nativeDate: [{
404
- keyword: schemaKeywords.date,
405
- args: { type: "date" }
406
- }]
407
- },
408
- additionalProperties: []
225
+ }] }
409
226
  }
410
- }
411
- },
412
- {
413
- name: "objectAnd",
414
- schema: {
415
- keyword: schemaKeywords.object,
416
- args: {
417
- properties: {
418
- firstName: [
419
- { keyword: schemaKeywords.deprecated },
420
- {
421
- keyword: schemaKeywords.default,
422
- args: "test"
423
- },
227
+ },
228
+ {
229
+ name: "arrayAdvanced",
230
+ schema: {
231
+ keyword: schemaKeywords.array,
232
+ args: {
233
+ items: [
424
234
  {
425
235
  keyword: schemaKeywords.min,
426
- args: 2
236
+ args: 1
427
237
  },
428
- { keyword: schemaKeywords.string }
429
- ],
430
- age: [
431
238
  {
432
- keyword: schemaKeywords.example,
433
- args: "2"
434
- },
435
- {
436
- keyword: schemaKeywords.default,
437
- args: 2
438
- },
439
- {
440
- keyword: schemaKeywords.min,
441
- args: 3
239
+ keyword: schemaKeywords.max,
240
+ args: 10
442
241
  },
443
242
  { keyword: schemaKeywords.number }
444
243
  ],
445
- address: [
446
- {
447
- keyword: schemaKeywords.and,
448
- args: [{
449
- keyword: schemaKeywords.object,
450
- args: {
451
- properties: { street: [{ keyword: schemaKeywords.string }] },
452
- additionalProperties: []
453
- }
454
- }, {
455
- keyword: schemaKeywords.object,
456
- args: {
457
- properties: { city: [{ keyword: schemaKeywords.string }] },
458
- additionalProperties: []
459
- }
460
- }]
461
- },
462
- { keyword: schemaKeywords.nullable },
463
- {
464
- keyword: schemaKeywords.describe,
465
- args: "Your address"
466
- }
467
- ]
468
- },
469
- additionalProperties: []
244
+ min: 3,
245
+ max: 10
246
+ }
470
247
  }
471
- }
472
- },
473
- {
474
- name: "objectEnum",
475
- schema: {
476
- keyword: schemaKeywords.object,
477
- args: {
478
- properties: { version: [
479
- {
480
- keyword: schemaKeywords.schema,
481
- args: {
482
- format: "string",
483
- type: "string"
484
- }
485
- },
486
- {
487
- keyword: schemaKeywords.enum,
248
+ },
249
+ {
250
+ name: "arrayRegex",
251
+ schema: {
252
+ keyword: schemaKeywords.array,
253
+ args: {
254
+ items: [{
255
+ keyword: schemaKeywords.matches,
256
+ args: "^[a-zA-Z0-9]{1,13}$"
257
+ }],
258
+ min: 3,
259
+ max: 10
260
+ }
261
+ }
262
+ },
263
+ {
264
+ name: "union",
265
+ schema: {
266
+ keyword: schemaKeywords.union,
267
+ args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }]
268
+ }
269
+ },
270
+ {
271
+ name: "unionOne",
272
+ schema: {
273
+ keyword: schemaKeywords.union,
274
+ args: [{ keyword: schemaKeywords.string }]
275
+ }
276
+ },
277
+ {
278
+ name: "catchall",
279
+ schema: {
280
+ keyword: schemaKeywords.object,
281
+ args: {
282
+ properties: {},
283
+ additionalProperties: [{
284
+ keyword: schemaKeywords.ref,
488
285
  args: {
489
- name: "enum",
490
- typeName: "Enum",
491
- asConst: false,
492
- items: [
493
- {
494
- name: "A",
495
- value: "A",
496
- format: schemaKeywords.string
497
- },
498
- {
499
- name: "B",
500
- value: "B",
501
- format: schemaKeywords.string
502
- },
503
- {
504
- name: "C",
505
- value: "C",
506
- format: schemaKeywords.string
507
- },
508
- {
509
- name: 2,
510
- value: 2,
511
- format: schemaKeywords.number
512
- }
513
- ]
286
+ name: "Pet",
287
+ $ref: "#component/schema/Pet",
288
+ path: "./Pet.ts",
289
+ isImportable: true
514
290
  }
515
- },
516
- {
517
- keyword: schemaKeywords.min,
518
- args: 4
519
- },
520
- {
521
- keyword: schemaKeywords.describe,
522
- args: "Your address"
523
- }
524
- ] },
525
- additionalProperties: []
291
+ }]
292
+ }
526
293
  }
527
- }
528
- },
529
- {
530
- name: "objectObjectEnum",
531
- schema: {
532
- keyword: schemaKeywords.object,
533
- args: {
534
- properties: { prop1: [{
294
+ },
295
+ {
296
+ name: "and",
297
+ schema: {
298
+ keyword: schemaKeywords.and,
299
+ args: [{
535
300
  keyword: schemaKeywords.object,
536
301
  args: {
537
- properties: { prop2: [{
538
- keyword: schemaKeywords.schema,
539
- args: {
540
- format: "string",
541
- type: "string"
542
- }
543
- }, {
544
- keyword: schemaKeywords.enum,
545
- args: {
546
- name: "enum",
547
- typeName: "Enum",
548
- asConst: false,
549
- items: [{
550
- name: "A",
551
- value: "A",
552
- format: schemaKeywords.string
553
- }, {
554
- name: "B",
555
- value: "B",
556
- format: schemaKeywords.string
557
- }]
558
- }
559
- }] },
302
+ properties: { street: [{ keyword: schemaKeywords.string }] },
560
303
  additionalProperties: []
561
304
  }
562
- }] },
563
- additionalProperties: []
564
- }
565
- }
566
- },
567
- {
568
- name: "objectArrayObject",
569
- schema: {
570
- keyword: schemaKeywords.object,
571
- args: {
572
- properties: { ids: [{
573
- keyword: schemaKeywords.array,
305
+ }, {
306
+ keyword: schemaKeywords.object,
574
307
  args: {
575
- items: [{
576
- keyword: schemaKeywords.object,
577
- args: {
578
- properties: { enum: [{
579
- keyword: schemaKeywords.schema,
580
- args: {
581
- format: "string",
582
- type: "string"
583
- }
584
- }, {
585
- keyword: schemaKeywords.enum,
586
- args: {
587
- name: "enum",
588
- typeName: "Enum",
589
- asConst: false,
590
- items: [
591
- {
592
- name: "A",
593
- value: "A",
594
- format: schemaKeywords.string
595
- },
596
- {
597
- name: "B",
598
- value: "B",
599
- format: schemaKeywords.string
600
- },
601
- {
602
- name: "C",
603
- value: "C",
604
- format: schemaKeywords.string
605
- },
606
- {
607
- name: 2,
608
- value: 2,
609
- format: schemaKeywords.number
610
- }
611
- ]
612
- }
613
- }] },
614
- additionalProperties: []
615
- }
616
- }],
617
- min: 3,
618
- max: 10
308
+ properties: { city: [{ keyword: schemaKeywords.string }] },
309
+ additionalProperties: []
619
310
  }
620
- }] },
621
- additionalProperties: []
622
- }
623
- }
624
- },
625
- {
626
- name: "objectEmpty",
627
- schema: {
628
- keyword: schemaKeywords.object,
629
- args: {
630
- properties: {},
631
- additionalProperties: []
311
+ }]
632
312
  }
633
- }
634
- },
635
- {
636
- name: "default",
637
- schema: { keyword: schemaKeywords.default }
638
- },
639
- {
640
- name: "default",
641
- schema: {
642
- keyword: schemaKeywords.default,
643
- args: "default"
644
- }
645
- },
646
- {
647
- name: "blob",
648
- schema: { keyword: schemaKeywords.blob }
649
- },
650
- {
651
- name: "nullableAdditionalProperties",
652
- schema: {
653
- keyword: schemaKeywords.object,
654
- args: {
655
- properties: {},
656
- additionalProperties: [
657
- { keyword: schemaKeywords.string },
658
- {
659
- args: {
660
- format: void 0,
661
- type: schemaKeywords.string
662
- },
663
- keyword: schemaKeywords.schema
313
+ },
314
+ {
315
+ name: "object",
316
+ schema: {
317
+ keyword: schemaKeywords.object,
318
+ args: {
319
+ properties: {
320
+ firstName: [{ keyword: schemaKeywords.string }, {
321
+ keyword: schemaKeywords.min,
322
+ args: 2
323
+ }],
324
+ address: [
325
+ { keyword: schemaKeywords.string },
326
+ { keyword: schemaKeywords.nullable },
327
+ {
328
+ keyword: schemaKeywords.describe,
329
+ args: "\"Your address\""
330
+ }
331
+ ]
664
332
  },
665
- { keyword: schemaKeywords.nullable }
666
- ]
333
+ additionalProperties: []
334
+ }
667
335
  }
668
- }
669
- },
670
- {
671
- name: "andRefEnum",
672
- schema: {
673
- keyword: schemaKeywords.and,
674
- args: [{
675
- keyword: schemaKeywords.ref,
336
+ },
337
+ {
338
+ name: "objectOptional",
339
+ schema: {
340
+ keyword: schemaKeywords.object,
676
341
  args: {
677
- $ref: "#/components/schemas/IssueCategory",
678
- name: "createIssueCategory",
679
- path: "./createIssueCategory.ts",
680
- isImportable: true
342
+ properties: {
343
+ firstName: [
344
+ { keyword: schemaKeywords.string },
345
+ { keyword: schemaKeywords.optional },
346
+ {
347
+ keyword: schemaKeywords.min,
348
+ args: 2
349
+ }
350
+ ],
351
+ address: [
352
+ { keyword: schemaKeywords.string },
353
+ { keyword: schemaKeywords.nullable },
354
+ {
355
+ keyword: schemaKeywords.describe,
356
+ args: "\"Your address\""
357
+ }
358
+ ]
359
+ },
360
+ additionalProperties: []
681
361
  }
682
- }]
683
- }
684
- },
685
- {
686
- name: "objectWithNullableEnumRef",
687
- schema: {
688
- keyword: schemaKeywords.object,
689
- args: {
690
- properties: { category: [{
691
- keyword: schemaKeywords.and,
692
- args: [{
693
- keyword: schemaKeywords.ref,
362
+ }
363
+ },
364
+ {
365
+ name: "objectArray",
366
+ schema: {
367
+ keyword: schemaKeywords.object,
368
+ args: {
369
+ properties: { ids: [{
370
+ keyword: schemaKeywords.array,
694
371
  args: {
695
- $ref: "#/components/schemas/IssueCategory",
696
- name: "createIssueCategory",
697
- path: "./createIssueCategory.ts",
698
- isImportable: true
372
+ items: [{
373
+ keyword: schemaKeywords.matches,
374
+ args: "^[a-zA-Z0-9]{1,13}$"
375
+ }],
376
+ min: 3,
377
+ max: 10
699
378
  }
700
- }]
701
- }] },
702
- additionalProperties: []
379
+ }] },
380
+ additionalProperties: []
381
+ }
703
382
  }
704
- }
705
- }
706
- ];
707
- const full = [
708
- {
709
- name: "Upload",
710
- schema: [{ keyword: schemaKeywords.blob }]
711
- },
712
- {
713
- name: "PageSizeNumber",
714
- schema: [{ keyword: schemaKeywords.number }, {
715
- keyword: schemaKeywords.default,
716
- args: 10
717
- }]
718
- },
719
- {
720
- name: "PageSizeInteger",
721
- schema: [{ keyword: schemaKeywords.integer }, {
722
- keyword: schemaKeywords.default,
723
- args: 10
724
- }]
725
- },
726
- {
727
- name: "Object",
728
- schema: [
729
- { keyword: schemaKeywords.nullable },
730
- {
731
- keyword: schemaKeywords.describe,
732
- args: "Your address"
733
- },
734
- {
383
+ },
384
+ {
385
+ name: "objectDates",
386
+ schema: {
387
+ keyword: schemaKeywords.object,
388
+ args: {
389
+ properties: {
390
+ dateTime: [{
391
+ keyword: schemaKeywords.datetime,
392
+ args: { offset: true }
393
+ }],
394
+ date: [{
395
+ keyword: schemaKeywords.date,
396
+ args: { type: "string" }
397
+ }],
398
+ time: [{
399
+ keyword: schemaKeywords.time,
400
+ args: { type: "string" }
401
+ }],
402
+ nativeDate: [{
403
+ keyword: schemaKeywords.date,
404
+ args: { type: "date" }
405
+ }]
406
+ },
407
+ additionalProperties: []
408
+ }
409
+ }
410
+ },
411
+ {
412
+ name: "objectAnd",
413
+ schema: {
735
414
  keyword: schemaKeywords.object,
736
415
  args: {
737
416
  properties: {
@@ -758,20 +437,23 @@ const full = [
758
437
  },
759
438
  {
760
439
  keyword: schemaKeywords.min,
761
- args: 2
440
+ args: 3
762
441
  },
763
442
  { keyword: schemaKeywords.number }
764
443
  ],
765
444
  address: [
766
445
  {
767
446
  keyword: schemaKeywords.and,
768
- args: [{ keyword: schemaKeywords.string }, {
447
+ args: [{
769
448
  keyword: schemaKeywords.object,
770
449
  args: {
771
- properties: {
772
- street: [{ keyword: schemaKeywords.string }],
773
- city: [{ keyword: schemaKeywords.string }]
774
- },
450
+ properties: { street: [{ keyword: schemaKeywords.string }] },
451
+ additionalProperties: []
452
+ }
453
+ }, {
454
+ keyword: schemaKeywords.object,
455
+ args: {
456
+ properties: { city: [{ keyword: schemaKeywords.string }] },
775
457
  additionalProperties: []
776
458
  }
777
459
  }]
@@ -786,93 +468,407 @@ const full = [
786
468
  additionalProperties: []
787
469
  }
788
470
  }
789
- ]
790
- },
791
- {
792
- name: "Order",
793
- schema: [{
794
- keyword: schemaKeywords.schema,
795
- args: { type: "object" }
796
- }, {
797
- keyword: schemaKeywords.object,
798
- args: {
799
- properties: { status: [{
800
- keyword: schemaKeywords.enum,
801
- args: {
802
- name: "orderStatus",
803
- asConst: false,
804
- typeName: "OrderStatus",
805
- items: [{
806
- name: "Placed",
807
- value: "placed",
808
- format: "string"
809
- }, {
810
- name: "Approved",
811
- value: "approved",
812
- format: "string"
813
- }]
814
- }
815
- }] },
816
- additionalProperties: []
817
- }
818
- }]
819
- },
820
- {
821
- name: "nullableAdditionalProperties",
822
- schema: [{
823
- keyword: schemaKeywords.object,
824
- args: {
825
- properties: {},
826
- additionalProperties: [
827
- { keyword: schemaKeywords.string },
828
- {
829
- args: {
830
- format: void 0,
831
- type: schemaKeywords.string
471
+ },
472
+ {
473
+ name: "objectEnum",
474
+ schema: {
475
+ keyword: schemaKeywords.object,
476
+ args: {
477
+ properties: { version: [
478
+ {
479
+ keyword: schemaKeywords.schema,
480
+ args: {
481
+ format: "string",
482
+ type: "string"
483
+ }
832
484
  },
833
- keyword: schemaKeywords.schema
834
- },
835
- { keyword: schemaKeywords.number }
836
- ]
837
- }
838
- }]
839
- },
840
- {
841
- name: "Record",
842
- schema: [
843
- {
485
+ {
486
+ keyword: schemaKeywords.enum,
487
+ args: {
488
+ name: "enum",
489
+ typeName: "Enum",
490
+ asConst: false,
491
+ items: [
492
+ {
493
+ name: "A",
494
+ value: "A",
495
+ format: schemaKeywords.string
496
+ },
497
+ {
498
+ name: "B",
499
+ value: "B",
500
+ format: schemaKeywords.string
501
+ },
502
+ {
503
+ name: "C",
504
+ value: "C",
505
+ format: schemaKeywords.string
506
+ },
507
+ {
508
+ name: 2,
509
+ value: 2,
510
+ format: schemaKeywords.number
511
+ }
512
+ ]
513
+ }
514
+ },
515
+ {
516
+ keyword: schemaKeywords.min,
517
+ args: 4
518
+ },
519
+ {
520
+ keyword: schemaKeywords.describe,
521
+ args: "Your address"
522
+ }
523
+ ] },
524
+ additionalProperties: []
525
+ }
526
+ }
527
+ },
528
+ {
529
+ name: "objectObjectEnum",
530
+ schema: {
531
+ keyword: schemaKeywords.object,
532
+ args: {
533
+ properties: { prop1: [{
534
+ keyword: schemaKeywords.object,
535
+ args: {
536
+ properties: { prop2: [{
537
+ keyword: schemaKeywords.schema,
538
+ args: {
539
+ format: "string",
540
+ type: "string"
541
+ }
542
+ }, {
543
+ keyword: schemaKeywords.enum,
544
+ args: {
545
+ name: "enum",
546
+ typeName: "Enum",
547
+ asConst: false,
548
+ items: [{
549
+ name: "A",
550
+ value: "A",
551
+ format: schemaKeywords.string
552
+ }, {
553
+ name: "B",
554
+ value: "B",
555
+ format: schemaKeywords.string
556
+ }]
557
+ }
558
+ }] },
559
+ additionalProperties: []
560
+ }
561
+ }] },
562
+ additionalProperties: []
563
+ }
564
+ }
565
+ },
566
+ {
567
+ name: "objectArrayObject",
568
+ schema: {
569
+ keyword: schemaKeywords.object,
570
+ args: {
571
+ properties: { ids: [{
572
+ keyword: schemaKeywords.array,
573
+ args: {
574
+ items: [{
575
+ keyword: schemaKeywords.object,
576
+ args: {
577
+ properties: { enum: [{
578
+ keyword: schemaKeywords.schema,
579
+ args: {
580
+ format: "string",
581
+ type: "string"
582
+ }
583
+ }, {
584
+ keyword: schemaKeywords.enum,
585
+ args: {
586
+ name: "enum",
587
+ typeName: "Enum",
588
+ asConst: false,
589
+ items: [
590
+ {
591
+ name: "A",
592
+ value: "A",
593
+ format: schemaKeywords.string
594
+ },
595
+ {
596
+ name: "B",
597
+ value: "B",
598
+ format: schemaKeywords.string
599
+ },
600
+ {
601
+ name: "C",
602
+ value: "C",
603
+ format: schemaKeywords.string
604
+ },
605
+ {
606
+ name: 2,
607
+ value: 2,
608
+ format: schemaKeywords.number
609
+ }
610
+ ]
611
+ }
612
+ }] },
613
+ additionalProperties: []
614
+ }
615
+ }],
616
+ min: 3,
617
+ max: 10
618
+ }
619
+ }] },
620
+ additionalProperties: []
621
+ }
622
+ }
623
+ },
624
+ {
625
+ name: "objectEmpty",
626
+ schema: {
627
+ keyword: schemaKeywords.object,
628
+ args: {
629
+ properties: {},
630
+ additionalProperties: []
631
+ }
632
+ }
633
+ },
634
+ {
635
+ name: "default",
636
+ schema: { keyword: schemaKeywords.default }
637
+ },
638
+ {
639
+ name: "default",
640
+ schema: {
641
+ keyword: schemaKeywords.default,
642
+ args: "default"
643
+ }
644
+ },
645
+ {
646
+ name: "blob",
647
+ schema: { keyword: schemaKeywords.blob }
648
+ },
649
+ {
650
+ name: "nullableAdditionalProperties",
651
+ schema: {
844
652
  keyword: schemaKeywords.object,
845
653
  args: {
846
654
  properties: {},
847
655
  additionalProperties: [
848
- { keyword: schemaKeywords.integer },
656
+ { keyword: schemaKeywords.string },
849
657
  {
850
- keyword: schemaKeywords.schema,
851
658
  args: {
852
- type: "integer",
853
- format: "int32"
854
- }
659
+ format: void 0,
660
+ type: schemaKeywords.string
661
+ },
662
+ keyword: schemaKeywords.schema
855
663
  },
856
- { keyword: schemaKeywords.optional }
664
+ { keyword: schemaKeywords.nullable }
857
665
  ]
858
666
  }
859
- },
860
- {
667
+ }
668
+ },
669
+ {
670
+ name: "andRefEnum",
671
+ schema: {
672
+ keyword: schemaKeywords.and,
673
+ args: [{
674
+ keyword: schemaKeywords.ref,
675
+ args: {
676
+ $ref: "#/components/schemas/IssueCategory",
677
+ name: "createIssueCategory",
678
+ path: "./createIssueCategory.ts",
679
+ isImportable: true
680
+ }
681
+ }]
682
+ }
683
+ },
684
+ {
685
+ name: "objectWithNullableEnumRef",
686
+ schema: {
687
+ keyword: schemaKeywords.object,
688
+ args: {
689
+ properties: { category: [{
690
+ keyword: schemaKeywords.and,
691
+ args: [{
692
+ keyword: schemaKeywords.ref,
693
+ args: {
694
+ $ref: "#/components/schemas/IssueCategory",
695
+ name: "createIssueCategory",
696
+ path: "./createIssueCategory.ts",
697
+ isImportable: true
698
+ }
699
+ }]
700
+ }] },
701
+ additionalProperties: []
702
+ }
703
+ }
704
+ }
705
+ ],
706
+ full: [
707
+ {
708
+ name: "Upload",
709
+ schema: [{ keyword: schemaKeywords.blob }]
710
+ },
711
+ {
712
+ name: "PageSizeNumber",
713
+ schema: [{ keyword: schemaKeywords.number }, {
714
+ keyword: schemaKeywords.default,
715
+ args: 10
716
+ }]
717
+ },
718
+ {
719
+ name: "PageSizeInteger",
720
+ schema: [{ keyword: schemaKeywords.integer }, {
721
+ keyword: schemaKeywords.default,
722
+ args: 10
723
+ }]
724
+ },
725
+ {
726
+ name: "Object",
727
+ schema: [
728
+ { keyword: schemaKeywords.nullable },
729
+ {
730
+ keyword: schemaKeywords.describe,
731
+ args: "Your address"
732
+ },
733
+ {
734
+ keyword: schemaKeywords.object,
735
+ args: {
736
+ properties: {
737
+ firstName: [
738
+ { keyword: schemaKeywords.deprecated },
739
+ {
740
+ keyword: schemaKeywords.default,
741
+ args: "test"
742
+ },
743
+ {
744
+ keyword: schemaKeywords.min,
745
+ args: 2
746
+ },
747
+ { keyword: schemaKeywords.string }
748
+ ],
749
+ age: [
750
+ {
751
+ keyword: schemaKeywords.example,
752
+ args: "2"
753
+ },
754
+ {
755
+ keyword: schemaKeywords.default,
756
+ args: 2
757
+ },
758
+ {
759
+ keyword: schemaKeywords.min,
760
+ args: 2
761
+ },
762
+ { keyword: schemaKeywords.number }
763
+ ],
764
+ address: [
765
+ {
766
+ keyword: schemaKeywords.and,
767
+ args: [{ keyword: schemaKeywords.string }, {
768
+ keyword: schemaKeywords.object,
769
+ args: {
770
+ properties: {
771
+ street: [{ keyword: schemaKeywords.string }],
772
+ city: [{ keyword: schemaKeywords.string }]
773
+ },
774
+ additionalProperties: []
775
+ }
776
+ }]
777
+ },
778
+ { keyword: schemaKeywords.nullable },
779
+ {
780
+ keyword: schemaKeywords.describe,
781
+ args: "Your address"
782
+ }
783
+ ]
784
+ },
785
+ additionalProperties: []
786
+ }
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ name: "Order",
792
+ schema: [{
861
793
  keyword: schemaKeywords.schema,
794
+ args: { type: "object" }
795
+ }, {
796
+ keyword: schemaKeywords.object,
862
797
  args: {
863
- type: "integer",
864
- format: "int32"
798
+ properties: { status: [{
799
+ keyword: schemaKeywords.enum,
800
+ args: {
801
+ name: "orderStatus",
802
+ asConst: false,
803
+ typeName: "OrderStatus",
804
+ items: [{
805
+ name: "Placed",
806
+ value: "placed",
807
+ format: "string"
808
+ }, {
809
+ name: "Approved",
810
+ value: "approved",
811
+ format: "string"
812
+ }]
813
+ }
814
+ }] },
815
+ additionalProperties: []
865
816
  }
866
- },
867
- { keyword: schemaKeywords.optional }
868
- ]
869
- }
870
- ];
871
- const schemas = {
872
- basic,
873
- full
817
+ }]
818
+ },
819
+ {
820
+ name: "nullableAdditionalProperties",
821
+ schema: [{
822
+ keyword: schemaKeywords.object,
823
+ args: {
824
+ properties: {},
825
+ additionalProperties: [
826
+ { keyword: schemaKeywords.string },
827
+ {
828
+ args: {
829
+ format: void 0,
830
+ type: schemaKeywords.string
831
+ },
832
+ keyword: schemaKeywords.schema
833
+ },
834
+ { keyword: schemaKeywords.number }
835
+ ]
836
+ }
837
+ }]
838
+ },
839
+ {
840
+ name: "Record",
841
+ schema: [
842
+ {
843
+ keyword: schemaKeywords.object,
844
+ args: {
845
+ properties: {},
846
+ additionalProperties: [
847
+ { keyword: schemaKeywords.integer },
848
+ {
849
+ keyword: schemaKeywords.schema,
850
+ args: {
851
+ type: "integer",
852
+ format: "int32"
853
+ }
854
+ },
855
+ { keyword: schemaKeywords.optional }
856
+ ]
857
+ }
858
+ },
859
+ {
860
+ keyword: schemaKeywords.schema,
861
+ args: {
862
+ type: "integer",
863
+ format: "int32"
864
+ }
865
+ },
866
+ { keyword: schemaKeywords.optional }
867
+ ]
868
+ }
869
+ ]
874
870
  };
875
-
876
871
  //#endregion
877
872
  export { schemas };
873
+
878
874
  //# sourceMappingURL=mocks.js.map