@kubb/plugin-oas 5.0.0-alpha.3 → 5.0.0-alpha.30
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/{SchemaMapper-SneuY1wg.d.ts → SchemaMapper-CLIXrzqv.d.ts} +3 -3
- package/dist/SchemaMapper-CeavHZlp.cjs.map +1 -1
- package/dist/SchemaMapper-CqMkO2T1.js.map +1 -1
- package/dist/{createGenerator-jtR_okrd.d.ts → createGenerator-DL3CAvaU.d.ts} +121 -70
- package/dist/{generators-vAAte6w6.cjs → generators-85sP4GIS.cjs} +7 -7
- package/dist/generators-85sP4GIS.cjs.map +1 -0
- package/dist/{generators-B8HiBWvT.js → generators-hPE06pZB.js} +7 -7
- package/dist/generators-hPE06pZB.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +4 -3
- package/dist/generators.js +1 -1
- package/dist/{getFooter-Pw3tLCiV.js → getFooter-Dz4u5Mg4.js} +5 -2
- package/dist/getFooter-Dz4u5Mg4.js.map +1 -0
- package/dist/{getFooter-BBzsC616.cjs → getFooter-gshcRE1-.cjs} +5 -2
- package/dist/getFooter-gshcRE1-.cjs.map +1 -0
- package/dist/hooks.cjs +25 -21
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +10 -7
- package/dist/hooks.js +27 -23
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +50 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26 -52
- package/dist/index.js +49 -44
- package/dist/index.js.map +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/{requestBody-BJJL0mpy.cjs → requestBody-94hwM4b-.cjs} +115 -304
- package/dist/requestBody-94hwM4b-.cjs.map +1 -0
- package/dist/{requestBody-CSL-jLGQ.js → requestBody-BO3N7fWH.js} +107 -290
- package/dist/requestBody-BO3N7fWH.js.map +1 -0
- package/dist/utils.cjs +61 -11
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.js +61 -11
- package/dist/utils.js.map +1 -1
- package/package.json +8 -12
- package/src/OperationGenerator.ts +72 -86
- package/src/SchemaGenerator.ts +61 -82
- package/src/SchemaMapper.ts +2 -2
- package/src/generators/createGenerator.ts +13 -16
- package/src/generators/createReactGenerator.ts +12 -15
- package/src/generators/index.ts +2 -2
- package/src/generators/jsonGenerator.ts +3 -3
- package/src/generators/types.ts +5 -43
- package/src/hooks/useOas.ts +5 -2
- package/src/hooks/useOperationManager.ts +22 -21
- package/src/hooks/useSchemaManager.ts +8 -8
- package/src/index.ts +2 -2
- package/src/plugin.ts +13 -9
- package/src/types.ts +15 -8
- package/src/utils/getBanner.ts +1 -1
- package/src/utils/getFooter.ts +1 -1
- package/src/utils/getImports.ts +3 -3
- package/src/utils/getParams.ts +2 -2
- package/src/utils.tsx +51 -151
- package/dist/generators-B8HiBWvT.js.map +0 -1
- package/dist/generators-vAAte6w6.cjs.map +0 -1
- package/dist/getFooter-BBzsC616.cjs.map +0 -1
- package/dist/getFooter-Pw3tLCiV.js.map +0 -1
- package/dist/requestBody-BJJL0mpy.cjs.map +0 -1
- package/dist/requestBody-CSL-jLGQ.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-ByKO4r7w.cjs");
|
|
2
|
-
const require_getFooter = require("./getFooter-
|
|
2
|
+
const require_getFooter = require("./getFooter-gshcRE1-.cjs");
|
|
3
3
|
const require_SchemaMapper = require("./SchemaMapper-CeavHZlp.cjs");
|
|
4
4
|
let _kubb_oas = require("@kubb/oas");
|
|
5
5
|
let remeda = require("remeda");
|
|
@@ -57,133 +57,6 @@ function stringify(value) {
|
|
|
57
57
|
return JSON.stringify(trimQuotes(value.toString()));
|
|
58
58
|
}
|
|
59
59
|
//#endregion
|
|
60
|
-
//#region ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
|
|
61
|
-
var Node = class {
|
|
62
|
-
value;
|
|
63
|
-
next;
|
|
64
|
-
constructor(value) {
|
|
65
|
-
this.value = value;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var Queue = class {
|
|
69
|
-
#head;
|
|
70
|
-
#tail;
|
|
71
|
-
#size;
|
|
72
|
-
constructor() {
|
|
73
|
-
this.clear();
|
|
74
|
-
}
|
|
75
|
-
enqueue(value) {
|
|
76
|
-
const node = new Node(value);
|
|
77
|
-
if (this.#head) {
|
|
78
|
-
this.#tail.next = node;
|
|
79
|
-
this.#tail = node;
|
|
80
|
-
} else {
|
|
81
|
-
this.#head = node;
|
|
82
|
-
this.#tail = node;
|
|
83
|
-
}
|
|
84
|
-
this.#size++;
|
|
85
|
-
}
|
|
86
|
-
dequeue() {
|
|
87
|
-
const current = this.#head;
|
|
88
|
-
if (!current) return;
|
|
89
|
-
this.#head = this.#head.next;
|
|
90
|
-
this.#size--;
|
|
91
|
-
if (!this.#head) this.#tail = void 0;
|
|
92
|
-
return current.value;
|
|
93
|
-
}
|
|
94
|
-
peek() {
|
|
95
|
-
if (!this.#head) return;
|
|
96
|
-
return this.#head.value;
|
|
97
|
-
}
|
|
98
|
-
clear() {
|
|
99
|
-
this.#head = void 0;
|
|
100
|
-
this.#tail = void 0;
|
|
101
|
-
this.#size = 0;
|
|
102
|
-
}
|
|
103
|
-
get size() {
|
|
104
|
-
return this.#size;
|
|
105
|
-
}
|
|
106
|
-
*[Symbol.iterator]() {
|
|
107
|
-
let current = this.#head;
|
|
108
|
-
while (current) {
|
|
109
|
-
yield current.value;
|
|
110
|
-
current = current.next;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
*drain() {
|
|
114
|
-
while (this.#head) yield this.dequeue();
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
//#endregion
|
|
118
|
-
//#region ../../node_modules/.pnpm/p-limit@7.3.0/node_modules/p-limit/index.js
|
|
119
|
-
function pLimit(concurrency) {
|
|
120
|
-
let rejectOnClear = false;
|
|
121
|
-
if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
|
|
122
|
-
validateConcurrency(concurrency);
|
|
123
|
-
if (typeof rejectOnClear !== "boolean") throw new TypeError("Expected `rejectOnClear` to be a boolean");
|
|
124
|
-
const queue = new Queue();
|
|
125
|
-
let activeCount = 0;
|
|
126
|
-
const resumeNext = () => {
|
|
127
|
-
if (activeCount < concurrency && queue.size > 0) {
|
|
128
|
-
activeCount++;
|
|
129
|
-
queue.dequeue().run();
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
const next = () => {
|
|
133
|
-
activeCount--;
|
|
134
|
-
resumeNext();
|
|
135
|
-
};
|
|
136
|
-
const run = async (function_, resolve, arguments_) => {
|
|
137
|
-
const result = (async () => function_(...arguments_))();
|
|
138
|
-
resolve(result);
|
|
139
|
-
try {
|
|
140
|
-
await result;
|
|
141
|
-
} catch {}
|
|
142
|
-
next();
|
|
143
|
-
};
|
|
144
|
-
const enqueue = (function_, resolve, reject, arguments_) => {
|
|
145
|
-
const queueItem = { reject };
|
|
146
|
-
new Promise((internalResolve) => {
|
|
147
|
-
queueItem.run = internalResolve;
|
|
148
|
-
queue.enqueue(queueItem);
|
|
149
|
-
}).then(run.bind(void 0, function_, resolve, arguments_));
|
|
150
|
-
if (activeCount < concurrency) resumeNext();
|
|
151
|
-
};
|
|
152
|
-
const generator = (function_, ...arguments_) => new Promise((resolve, reject) => {
|
|
153
|
-
enqueue(function_, resolve, reject, arguments_);
|
|
154
|
-
});
|
|
155
|
-
Object.defineProperties(generator, {
|
|
156
|
-
activeCount: { get: () => activeCount },
|
|
157
|
-
pendingCount: { get: () => queue.size },
|
|
158
|
-
clearQueue: { value() {
|
|
159
|
-
if (!rejectOnClear) {
|
|
160
|
-
queue.clear();
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
const abortError = AbortSignal.abort().reason;
|
|
164
|
-
while (queue.size > 0) queue.dequeue().reject(abortError);
|
|
165
|
-
} },
|
|
166
|
-
concurrency: {
|
|
167
|
-
get: () => concurrency,
|
|
168
|
-
set(newConcurrency) {
|
|
169
|
-
validateConcurrency(newConcurrency);
|
|
170
|
-
concurrency = newConcurrency;
|
|
171
|
-
queueMicrotask(() => {
|
|
172
|
-
while (activeCount < concurrency && queue.size > 0) resumeNext();
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
map: { async value(iterable, function_) {
|
|
177
|
-
const promises = Array.from(iterable, (value, index) => this(function_, value, index));
|
|
178
|
-
return Promise.all(promises);
|
|
179
|
-
} }
|
|
180
|
-
});
|
|
181
|
-
return generator;
|
|
182
|
-
}
|
|
183
|
-
function validateConcurrency(concurrency) {
|
|
184
|
-
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
185
|
-
}
|
|
186
|
-
//#endregion
|
|
187
60
|
//#region src/utils/getSchemaFactory.ts
|
|
188
61
|
/**
|
|
189
62
|
* Creates a factory function that generates a versioned OpenAPI schema result.
|
|
@@ -203,137 +76,83 @@ function getSchemaFactory(oas) {
|
|
|
203
76
|
}
|
|
204
77
|
//#endregion
|
|
205
78
|
//#region src/utils.tsx
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
async function
|
|
210
|
-
const { config, fabric, plugin } = options;
|
|
211
|
-
if (!
|
|
79
|
+
/**
|
|
80
|
+
* Renders a React component for a list of operations (V1 generators).
|
|
81
|
+
*/
|
|
82
|
+
async function renderOperations(operations, options) {
|
|
83
|
+
const { config, fabric, plugin, Component, generator } = options;
|
|
84
|
+
if (!Component) return;
|
|
85
|
+
const { driver, oas, mode } = generator.context;
|
|
212
86
|
const fabricChild = (0, _kubb_react_fabric.createReactFabric)();
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
})
|
|
229
|
-
}));
|
|
230
|
-
} else {
|
|
231
|
-
const { Component, adapter } = options;
|
|
232
|
-
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.App, {
|
|
233
|
-
meta: { plugin },
|
|
234
|
-
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
235
|
-
config,
|
|
236
|
-
adapter,
|
|
237
|
-
nodes: operationsOrNodes,
|
|
238
|
-
options: plugin.options
|
|
239
|
-
})
|
|
240
|
-
}));
|
|
241
|
-
}
|
|
242
|
-
await fabric.context.fileManager.upsert(...fabricChild.files);
|
|
87
|
+
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Fabric, {
|
|
88
|
+
meta: {
|
|
89
|
+
driver,
|
|
90
|
+
plugin,
|
|
91
|
+
mode,
|
|
92
|
+
oas
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
95
|
+
config,
|
|
96
|
+
operations,
|
|
97
|
+
generator,
|
|
98
|
+
plugin
|
|
99
|
+
})
|
|
100
|
+
}));
|
|
101
|
+
fabric.context.fileManager.upsert(...fabricChild.files);
|
|
243
102
|
fabricChild.unmount();
|
|
244
103
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
async function
|
|
249
|
-
const { config, fabric, plugin } = options;
|
|
250
|
-
if (!
|
|
104
|
+
/**
|
|
105
|
+
* Renders a React component for a single operation (V1 generators).
|
|
106
|
+
*/
|
|
107
|
+
async function renderOperation(operation, options) {
|
|
108
|
+
const { config, fabric, plugin, Component, generator } = options;
|
|
109
|
+
if (!Component) return;
|
|
110
|
+
const { driver, oas, mode } = generator.context;
|
|
251
111
|
const fabricChild = (0, _kubb_react_fabric.createReactFabric)();
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
})
|
|
268
|
-
}));
|
|
269
|
-
} else {
|
|
270
|
-
const { Component, adapter, pluginManager, mode } = options;
|
|
271
|
-
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.App, {
|
|
272
|
-
meta: {
|
|
273
|
-
plugin,
|
|
274
|
-
pluginManager,
|
|
275
|
-
mode
|
|
276
|
-
},
|
|
277
|
-
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
278
|
-
config,
|
|
279
|
-
adapter,
|
|
280
|
-
node: operationOrNode,
|
|
281
|
-
options: plugin.options
|
|
282
|
-
})
|
|
283
|
-
}));
|
|
284
|
-
}
|
|
285
|
-
await fabric.context.fileManager.upsert(...fabricChild.files);
|
|
112
|
+
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Fabric, {
|
|
113
|
+
meta: {
|
|
114
|
+
driver,
|
|
115
|
+
plugin,
|
|
116
|
+
mode,
|
|
117
|
+
oas
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
120
|
+
config,
|
|
121
|
+
operation,
|
|
122
|
+
plugin,
|
|
123
|
+
generator
|
|
124
|
+
})
|
|
125
|
+
}));
|
|
126
|
+
fabric.context.fileManager.upsert(...fabricChild.files);
|
|
286
127
|
fabricChild.unmount();
|
|
287
128
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
async function
|
|
292
|
-
const { config, fabric, plugin } = options;
|
|
293
|
-
if (!
|
|
129
|
+
/**
|
|
130
|
+
* Renders a React component for a single schema (V1 generators).
|
|
131
|
+
*/
|
|
132
|
+
async function renderSchema(schema, options) {
|
|
133
|
+
const { config, fabric, plugin, Component, generator } = options;
|
|
134
|
+
if (!Component) return;
|
|
135
|
+
const { driver, oas, mode } = generator.context;
|
|
294
136
|
const fabricChild = (0, _kubb_react_fabric.createReactFabric)();
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
})
|
|
311
|
-
}));
|
|
312
|
-
} else {
|
|
313
|
-
const { Component, adapter, pluginManager, mode } = options;
|
|
314
|
-
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.App, {
|
|
315
|
-
meta: {
|
|
316
|
-
plugin,
|
|
317
|
-
pluginManager,
|
|
318
|
-
mode
|
|
319
|
-
},
|
|
320
|
-
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
321
|
-
config,
|
|
322
|
-
adapter,
|
|
323
|
-
node: schema,
|
|
324
|
-
options: plugin.options
|
|
325
|
-
})
|
|
326
|
-
}));
|
|
327
|
-
}
|
|
328
|
-
await fabric.context.fileManager.upsert(...fabricChild.files);
|
|
137
|
+
await fabricChild.render(/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Fabric, {
|
|
138
|
+
meta: {
|
|
139
|
+
driver,
|
|
140
|
+
plugin,
|
|
141
|
+
mode,
|
|
142
|
+
oas
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(Component, {
|
|
145
|
+
config,
|
|
146
|
+
schema,
|
|
147
|
+
plugin,
|
|
148
|
+
generator
|
|
149
|
+
})
|
|
150
|
+
}));
|
|
151
|
+
fabric.context.fileManager.upsert(...fabricChild.files);
|
|
329
152
|
fabricChild.unmount();
|
|
330
153
|
}
|
|
331
154
|
//#endregion
|
|
332
155
|
//#region src/SchemaGenerator.ts
|
|
333
|
-
/** Max concurrent generator tasks (across generators). */
|
|
334
|
-
const GENERATOR_CONCURRENCY = 3;
|
|
335
|
-
/** Max concurrent schema parsing tasks (per generator). */
|
|
336
|
-
const SCHEMA_CONCURRENCY = 30;
|
|
337
156
|
var SchemaGenerator = class SchemaGenerator {
|
|
338
157
|
#options;
|
|
339
158
|
#context;
|
|
@@ -610,17 +429,17 @@ var SchemaGenerator = class SchemaGenerator {
|
|
|
610
429
|
this.#ensureNameMapping();
|
|
611
430
|
const originalName = $ref.replace(/.+\//, "");
|
|
612
431
|
const resolvedName = this.#schemaNameMapping.get($ref) || originalName;
|
|
613
|
-
const propertyName = this.context.
|
|
432
|
+
const propertyName = this.context.driver.resolveName({
|
|
614
433
|
name: resolvedName,
|
|
615
434
|
pluginName: this.context.plugin.name,
|
|
616
435
|
type: "function"
|
|
617
436
|
});
|
|
618
|
-
const fileName = this.context.
|
|
437
|
+
const fileName = this.context.driver.resolveName({
|
|
619
438
|
name: resolvedName,
|
|
620
439
|
pluginName: this.context.plugin.name,
|
|
621
440
|
type: "file"
|
|
622
441
|
});
|
|
623
|
-
const file = this.context.
|
|
442
|
+
const file = this.context.driver.getFile({
|
|
624
443
|
name: fileName,
|
|
625
444
|
pluginName: this.context.plugin.name,
|
|
626
445
|
extname: ".ts"
|
|
@@ -932,7 +751,7 @@ var SchemaGenerator = class SchemaGenerator {
|
|
|
932
751
|
options.enumSuffix
|
|
933
752
|
];
|
|
934
753
|
const enumName = useCollisionDetection ? require_getFooter.pascalCase(enumNameParts.join(" ")) : getUniqueName(require_getFooter.pascalCase(enumNameParts.join(" ")), this.options.usedEnumNames || {});
|
|
935
|
-
const typeName = this.context.
|
|
754
|
+
const typeName = this.context.driver.resolveName({
|
|
936
755
|
name: enumName,
|
|
937
756
|
pluginName: this.context.plugin.name,
|
|
938
757
|
type: "type"
|
|
@@ -1259,12 +1078,11 @@ var SchemaGenerator = class SchemaGenerator {
|
|
|
1259
1078
|
}
|
|
1260
1079
|
async #doBuild(schemas, generators) {
|
|
1261
1080
|
const schemaEntries = Object.entries(schemas);
|
|
1262
|
-
const
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
-
if (generator.version === "2") return [];
|
|
1081
|
+
const results = [];
|
|
1082
|
+
for (const generator of generators) {
|
|
1083
|
+
if (!("type" in generator)) continue;
|
|
1266
1084
|
const v1Generator = generator;
|
|
1267
|
-
const
|
|
1085
|
+
for (const [name, schemaObject] of schemaEntries) {
|
|
1268
1086
|
const options = this.#getOptions(name);
|
|
1269
1087
|
const tree = this.parse({
|
|
1270
1088
|
schema: schemaObject,
|
|
@@ -1272,16 +1090,32 @@ var SchemaGenerator = class SchemaGenerator {
|
|
|
1272
1090
|
parentName: null,
|
|
1273
1091
|
rootName: name
|
|
1274
1092
|
});
|
|
1275
|
-
if (v1Generator.type === "react") {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1093
|
+
if (v1Generator.type === "react") await renderSchema({
|
|
1094
|
+
name,
|
|
1095
|
+
value: schemaObject,
|
|
1096
|
+
tree
|
|
1097
|
+
}, {
|
|
1098
|
+
config: this.context.driver.config,
|
|
1099
|
+
fabric: this.context.fabric,
|
|
1100
|
+
Component: v1Generator.Schema,
|
|
1101
|
+
generator: this,
|
|
1102
|
+
plugin: {
|
|
1103
|
+
...this.context.plugin,
|
|
1104
|
+
options: {
|
|
1105
|
+
...this.options,
|
|
1106
|
+
...options
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
});
|
|
1110
|
+
else {
|
|
1111
|
+
const result = await v1Generator.schema?.({
|
|
1112
|
+
config: this.context.driver.config,
|
|
1284
1113
|
generator: this,
|
|
1114
|
+
schema: {
|
|
1115
|
+
name,
|
|
1116
|
+
value: schemaObject,
|
|
1117
|
+
tree
|
|
1118
|
+
},
|
|
1285
1119
|
plugin: {
|
|
1286
1120
|
...this.context.plugin,
|
|
1287
1121
|
options: {
|
|
@@ -1290,28 +1124,11 @@ var SchemaGenerator = class SchemaGenerator {
|
|
|
1290
1124
|
}
|
|
1291
1125
|
}
|
|
1292
1126
|
});
|
|
1293
|
-
|
|
1127
|
+
results.push(...[result ?? []].flat());
|
|
1294
1128
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
schema: {
|
|
1299
|
-
name,
|
|
1300
|
-
value: schemaObject,
|
|
1301
|
-
tree
|
|
1302
|
-
},
|
|
1303
|
-
plugin: {
|
|
1304
|
-
...this.context.plugin,
|
|
1305
|
-
options: {
|
|
1306
|
-
...this.options,
|
|
1307
|
-
...options
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
}) ?? [];
|
|
1311
|
-
}));
|
|
1312
|
-
return (await Promise.all(schemaTasks)).flat();
|
|
1313
|
-
}));
|
|
1314
|
-
return (await Promise.all(writeTasks)).flat();
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
return results;
|
|
1315
1132
|
}
|
|
1316
1133
|
};
|
|
1317
1134
|
//#endregion
|
|
@@ -1348,40 +1165,34 @@ Object.defineProperty(exports, "SchemaGenerator", {
|
|
|
1348
1165
|
return SchemaGenerator;
|
|
1349
1166
|
}
|
|
1350
1167
|
});
|
|
1351
|
-
Object.defineProperty(exports, "
|
|
1352
|
-
enumerable: true,
|
|
1353
|
-
get: function() {
|
|
1354
|
-
return buildOperation;
|
|
1355
|
-
}
|
|
1356
|
-
});
|
|
1357
|
-
Object.defineProperty(exports, "buildOperations", {
|
|
1168
|
+
Object.defineProperty(exports, "getSchemaFactory", {
|
|
1358
1169
|
enumerable: true,
|
|
1359
1170
|
get: function() {
|
|
1360
|
-
return
|
|
1171
|
+
return getSchemaFactory;
|
|
1361
1172
|
}
|
|
1362
1173
|
});
|
|
1363
|
-
Object.defineProperty(exports, "
|
|
1174
|
+
Object.defineProperty(exports, "isRequestBodyRequired", {
|
|
1364
1175
|
enumerable: true,
|
|
1365
1176
|
get: function() {
|
|
1366
|
-
return
|
|
1177
|
+
return isRequestBodyRequired;
|
|
1367
1178
|
}
|
|
1368
1179
|
});
|
|
1369
|
-
Object.defineProperty(exports, "
|
|
1180
|
+
Object.defineProperty(exports, "renderOperation", {
|
|
1370
1181
|
enumerable: true,
|
|
1371
1182
|
get: function() {
|
|
1372
|
-
return
|
|
1183
|
+
return renderOperation;
|
|
1373
1184
|
}
|
|
1374
1185
|
});
|
|
1375
|
-
Object.defineProperty(exports, "
|
|
1186
|
+
Object.defineProperty(exports, "renderOperations", {
|
|
1376
1187
|
enumerable: true,
|
|
1377
1188
|
get: function() {
|
|
1378
|
-
return
|
|
1189
|
+
return renderOperations;
|
|
1379
1190
|
}
|
|
1380
1191
|
});
|
|
1381
|
-
Object.defineProperty(exports, "
|
|
1192
|
+
Object.defineProperty(exports, "renderSchema", {
|
|
1382
1193
|
enumerable: true,
|
|
1383
1194
|
get: function() {
|
|
1384
|
-
return
|
|
1195
|
+
return renderSchema;
|
|
1385
1196
|
}
|
|
1386
1197
|
});
|
|
1387
1198
|
Object.defineProperty(exports, "withRequiredRequestBodySchema", {
|
|
@@ -1391,4 +1202,4 @@ Object.defineProperty(exports, "withRequiredRequestBodySchema", {
|
|
|
1391
1202
|
}
|
|
1392
1203
|
});
|
|
1393
1204
|
|
|
1394
|
-
//# sourceMappingURL=requestBody-
|
|
1205
|
+
//# sourceMappingURL=requestBody-94hwM4b-.cjs.map
|