@kubb/plugin-oas 3.0.0-alpha.2 → 3.0.0-alpha.21

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 (101) hide show
  1. package/README.md +13 -4
  2. package/dist/OperationGenerator-CHXolL0o.d.cts +553 -0
  3. package/dist/OperationGenerator-CHXolL0o.d.ts +553 -0
  4. package/dist/Schema-Ch0dHkM5.d.ts +22 -0
  5. package/dist/Schema-ClNodlyP.d.cts +22 -0
  6. package/dist/chunk-6UWOTOZJ.cjs +92 -0
  7. package/dist/chunk-6UWOTOZJ.cjs.map +1 -0
  8. package/dist/chunk-AZKUU24F.js +700 -0
  9. package/dist/chunk-AZKUU24F.js.map +1 -0
  10. package/dist/chunk-DFQJ57GH.js +45 -0
  11. package/dist/chunk-DFQJ57GH.js.map +1 -0
  12. package/dist/chunk-GF26SDHQ.js +28 -0
  13. package/dist/chunk-GF26SDHQ.js.map +1 -0
  14. package/dist/chunk-HP5WAFBU.cjs +48 -0
  15. package/dist/chunk-HP5WAFBU.cjs.map +1 -0
  16. package/dist/chunk-JNGUNN72.cjs +708 -0
  17. package/dist/chunk-JNGUNN72.cjs.map +1 -0
  18. package/dist/chunk-PADR76WZ.cjs +4 -0
  19. package/dist/chunk-PADR76WZ.cjs.map +1 -0
  20. package/dist/chunk-R47XMJ32.js +3 -0
  21. package/dist/chunk-R47XMJ32.js.map +1 -0
  22. package/dist/{chunk-Y4V7HHX7.js → chunk-THGCWF2O.js} +8 -13
  23. package/dist/{chunk-Y4V7HHX7.js.map → chunk-THGCWF2O.js.map} +1 -1
  24. package/dist/chunk-TRA5BTWI.js +88 -0
  25. package/dist/chunk-TRA5BTWI.js.map +1 -0
  26. package/dist/chunk-UO57DZPV.cjs +36 -0
  27. package/dist/chunk-UO57DZPV.cjs.map +1 -0
  28. package/dist/chunk-ZWHQ54JM.cjs +32 -0
  29. package/dist/chunk-ZWHQ54JM.cjs.map +1 -0
  30. package/dist/components.cjs +20 -17
  31. package/dist/components.cjs.map +1 -1
  32. package/dist/components.d.cts +12 -8
  33. package/dist/components.d.ts +12 -8
  34. package/dist/components.js +3 -17
  35. package/dist/components.js.map +1 -1
  36. package/dist/generators.cjs +14 -0
  37. package/dist/generators.cjs.map +1 -0
  38. package/dist/generators.d.cts +10 -0
  39. package/dist/generators.d.ts +10 -0
  40. package/dist/generators.js +5 -0
  41. package/dist/generators.js.map +1 -0
  42. package/dist/hooks.cjs +101 -57
  43. package/dist/hooks.cjs.map +1 -1
  44. package/dist/hooks.d.cts +40 -8
  45. package/dist/hooks.d.ts +40 -8
  46. package/dist/hooks.js +90 -53
  47. package/dist/hooks.js.map +1 -1
  48. package/dist/index.cjs +283 -261
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.d.cts +6 -77
  51. package/dist/index.d.ts +6 -77
  52. package/dist/index.js +235 -240
  53. package/dist/index.js.map +1 -1
  54. package/dist/utils.cjs +32 -87
  55. package/dist/utils.cjs.map +1 -1
  56. package/dist/utils.d.cts +7 -41
  57. package/dist/utils.d.ts +7 -41
  58. package/dist/utils.js +8 -86
  59. package/dist/utils.js.map +1 -1
  60. package/package.json +20 -14
  61. package/src/OperationGenerator.ts +75 -43
  62. package/src/SchemaGenerator.ts +44 -18
  63. package/src/SchemaMapper.ts +1 -1
  64. package/src/components/Oas.tsx +9 -3
  65. package/src/components/Operation.tsx +1 -1
  66. package/src/components/Schema.tsx +2 -102
  67. package/src/generator.tsx +133 -0
  68. package/src/generators/index.ts +1 -0
  69. package/src/generators/jsonGenerator.ts +32 -0
  70. package/src/hooks/index.ts +2 -0
  71. package/src/hooks/useOperationManager.ts +76 -28
  72. package/src/hooks/useSchemaManager.ts +77 -0
  73. package/src/index.ts +3 -9
  74. package/src/plugin.ts +64 -47
  75. package/src/types.ts +23 -12
  76. package/src/utils/getParams.ts +2 -2
  77. package/src/utils/index.ts +2 -2
  78. package/dist/OperationGenerator-CeM_9pxW.d.cts +0 -60
  79. package/dist/OperationGenerator-DhUhvRJE.d.ts +0 -60
  80. package/dist/Schema-DefwBJMc.d.ts +0 -35
  81. package/dist/Schema-an5hOrjZ.d.cts +0 -35
  82. package/dist/SchemaMapper-CsBQ6eEx.d.cts +0 -248
  83. package/dist/SchemaMapper-CsBQ6eEx.d.ts +0 -248
  84. package/dist/chunk-CJXRFYEF.cjs +0 -698
  85. package/dist/chunk-CJXRFYEF.cjs.map +0 -1
  86. package/dist/chunk-DRLYORTT.cjs +0 -3265
  87. package/dist/chunk-DRLYORTT.cjs.map +0 -1
  88. package/dist/chunk-K6KUETAI.js +0 -698
  89. package/dist/chunk-K6KUETAI.js.map +0 -1
  90. package/dist/chunk-LEACSHKT.js +0 -3265
  91. package/dist/chunk-LEACSHKT.js.map +0 -1
  92. package/dist/chunk-P42X362U.cjs +0 -101
  93. package/dist/chunk-P42X362U.cjs.map +0 -1
  94. package/dist/chunk-QLJIL3U5.cjs +0 -35
  95. package/dist/chunk-QLJIL3U5.cjs.map +0 -1
  96. package/dist/chunk-UB552H4J.js +0 -101
  97. package/dist/chunk-UB552H4J.js.map +0 -1
  98. package/dist/types-Dte3MA6H.d.cts +0 -143
  99. package/dist/types-Dte3MA6H.d.ts +0 -143
  100. package/src/utils/getGroupedByTagFiles.ts +0 -82
  101. package/src/utils/refSorter.ts +0 -13
package/dist/index.js CHANGED
@@ -1,148 +1,95 @@
1
- import {
2
- parseFromConfig
3
- } from "./chunk-Y4V7HHX7.js";
4
- import {
5
- SchemaGenerator,
6
- isKeyword,
7
- schemaKeywords
8
- } from "./chunk-K6KUETAI.js";
9
- import {
10
- __privateAdd,
11
- __privateGet,
12
- __privateMethod,
13
- __privateSet,
14
- getSchemas,
15
- init_esm_shims
16
- } from "./chunk-UB552H4J.js";
1
+ import { parseFromConfig } from './chunk-THGCWF2O.js';
2
+ import { jsonGenerator } from './chunk-TRA5BTWI.js';
3
+ export { createGenerator, createReactGenerator } from './chunk-TRA5BTWI.js';
4
+ import './chunk-R47XMJ32.js';
5
+ import { SchemaGenerator } from './chunk-AZKUU24F.js';
6
+ export { SchemaGenerator, isKeyword, schemaKeywords } from './chunk-AZKUU24F.js';
7
+ import { getSchemas } from './chunk-DFQJ57GH.js';
8
+ import './chunk-GF26SDHQ.js';
9
+ import { createPlugin, FileManager, BaseGenerator } from '@kubb/core';
10
+ import transformers from '@kubb/core/transformers';
11
+ import path from 'node:path';
17
12
 
18
- // src/index.ts
19
- init_esm_shims();
20
-
21
- // src/plugin.ts
22
- init_esm_shims();
23
- import path from "path";
24
- import { createPlugin } from "@kubb/core";
25
- import { camelCase } from "@kubb/core/transformers";
26
- var pluginOasName = "plugin-oas";
27
- var pluginOas = createPlugin((options) => {
28
- const {
29
- output = { path: "schemas", export: false },
30
- experimentalFilter: filter,
31
- experimentalSort: sort,
32
- validate = true,
33
- serverIndex = 0,
34
- contentType,
35
- oasClass
36
- } = options;
37
- const getOas = async ({ config, logger, formatOptions }) => {
38
- try {
39
- const oas = await parseFromConfig(config, formatOptions, oasClass);
40
- if (validate) {
41
- await oas.valdiate();
13
+ var OperationGenerator = class extends BaseGenerator {
14
+ #operationsByMethod = {};
15
+ get operationsByMethod() {
16
+ return this.#operationsByMethod;
17
+ }
18
+ set operationsByMethod(paths) {
19
+ this.#operationsByMethod = paths;
20
+ }
21
+ #getOptions(operation, method) {
22
+ const { override = [] } = this.context;
23
+ return override.find(({ pattern, type }) => {
24
+ if (type === "tag") {
25
+ return !!operation.getTags()[0]?.name.match(pattern);
42
26
  }
43
- return oas;
44
- } catch (e) {
45
- const error = e;
46
- logger.emit("warning", error?.message);
47
- return parseFromConfig(config, {}, oasClass);
48
- }
49
- };
50
- return {
51
- name: pluginOasName,
52
- options,
53
- context() {
54
- const { config, logger } = this;
55
- return {
56
- getOas(formatOptions) {
57
- return getOas({ config, logger, formatOptions });
58
- },
59
- async getSchemas({ includes } = {}) {
60
- const oas = await this.getOas();
61
- return getSchemas({ oas, contentType, includes });
62
- },
63
- async getBaseURL() {
64
- const oasInstance = await this.getOas();
65
- const baseURL = oasInstance.api.servers?.at(serverIndex)?.url;
66
- return baseURL;
67
- },
68
- contentType
69
- };
70
- },
71
- resolvePath(baseName) {
72
- if (output === false) {
73
- return void 0;
27
+ if (type === "operationId") {
28
+ return !!operation.getOperationId().match(pattern);
74
29
  }
75
- const root = path.resolve(this.config.root, this.config.output.path);
76
- return path.resolve(root, output.path, baseName);
77
- },
78
- resolveName(name, type) {
79
- return camelCase(name, { isFile: type === "file" });
80
- },
81
- async buildStart() {
82
- if (!output) {
83
- return;
30
+ if (type === "path") {
31
+ return !!operation.path.match(pattern);
84
32
  }
85
- const oas = await getOas({
86
- config: this.config,
87
- logger: this.logger,
88
- formatOptions: {
89
- filterSet: filter,
90
- sortSet: sort
91
- }
92
- });
93
- await oas.dereference();
94
- const schemas = getSchemas({ oas, contentType });
95
- const mapSchema = async ([name, schema]) => {
96
- const resolvedPath = this.resolvePath({
97
- baseName: `${name}.json`,
98
- pluginKey: this.plugin.key
99
- });
100
- const resvoledFileName = this.resolveName({
101
- name: `${name}.json`,
102
- pluginKey: [pluginOasName],
103
- type: "file"
104
- });
105
- if (!resolvedPath) {
106
- return;
107
- }
108
- await this.addFile({
109
- path: resolvedPath,
110
- baseName: resvoledFileName,
111
- source: JSON.stringify(schema),
112
- meta: {
113
- pluginKey: this.plugin.key
114
- }
115
- });
116
- };
117
- const promises = Object.entries(schemas).map(mapSchema);
118
- await Promise.all(promises);
119
- }
120
- };
121
- });
122
-
123
- // src/OperationGenerator.ts
124
- init_esm_shims();
125
- import { Generator } from "@kubb/core";
126
- import transformers from "@kubb/core/transformers";
127
- var _operationsByMethod, _OperationGenerator_instances, getOptions_fn, isExcluded_fn, isIncluded_fn, methods_get;
128
- var OperationGenerator = class extends Generator {
129
- constructor() {
130
- super(...arguments);
131
- __privateAdd(this, _OperationGenerator_instances);
132
- __privateAdd(this, _operationsByMethod, {});
33
+ if (type === "method") {
34
+ return !!method.match(pattern);
35
+ }
36
+ return false;
37
+ })?.options || {};
133
38
  }
134
- get operationsByMethod() {
135
- return __privateGet(this, _operationsByMethod);
39
+ /**
40
+ *
41
+ * @deprecated
42
+ */
43
+ #isExcluded(operation, method) {
44
+ const { exclude = [] } = this.context;
45
+ let matched = false;
46
+ exclude.forEach(({ pattern, type }) => {
47
+ if (type === "tag" && !matched) {
48
+ matched = !!operation.getTags()[0]?.name.match(pattern);
49
+ }
50
+ if (type === "operationId" && !matched) {
51
+ matched = !!operation.getOperationId().match(pattern);
52
+ }
53
+ if (type === "path" && !matched) {
54
+ matched = !!operation.path.match(pattern);
55
+ }
56
+ if (type === "method" && !matched) {
57
+ matched = !!method.match(pattern);
58
+ }
59
+ });
60
+ return matched;
136
61
  }
137
- set operationsByMethod(paths) {
138
- __privateSet(this, _operationsByMethod, paths);
62
+ /**
63
+ *
64
+ * @deprecated
65
+ */
66
+ #isIncluded(operation, method) {
67
+ const { include = [] } = this.context;
68
+ let matched = false;
69
+ include.forEach(({ pattern, type }) => {
70
+ if (type === "tag" && !matched) {
71
+ matched = !!operation.getTags()[0]?.name.match(pattern);
72
+ }
73
+ if (type === "operationId" && !matched) {
74
+ matched = !!operation.getOperationId().match(pattern);
75
+ }
76
+ if (type === "path" && !matched) {
77
+ matched = !!operation.path.match(pattern);
78
+ }
79
+ if (type === "method" && !matched) {
80
+ matched = !!method.match(pattern);
81
+ }
82
+ });
83
+ return matched;
139
84
  }
140
- getSchemas(operation, { forStatusCode, resolveName = (name) => name } = {}) {
85
+ getSchemas(operation, {
86
+ resolveName = (name) => name
87
+ } = {}) {
141
88
  const pathParamsSchema = this.context.oas.getParametersSchema(operation, "path");
142
89
  const queryParamsSchema = this.context.oas.getParametersSchema(operation, "query");
143
90
  const headerParamsSchema = this.context.oas.getParametersSchema(operation, "header");
144
91
  const requestSchema = this.context.oas.getRequestSchema(operation);
145
- const responseStatusCode = forStatusCode || operation.schema.responses && Object.keys(operation.schema.responses).find((key) => key.startsWith("2")) || 200;
92
+ const responseStatusCode = operation.schema.responses && Object.keys(operation.schema.responses).find((key) => key.startsWith("2")) || 200;
146
93
  const responseSchema = this.context.oas.getResponseSchema(operation, responseStatusCode);
147
94
  const statusCodes = operation.getResponseStatusCodes().map((statusCode) => {
148
95
  let name = statusCode;
@@ -211,16 +158,17 @@ var OperationGenerator = class extends Generator {
211
158
  statusCodes
212
159
  };
213
160
  }
214
- async build() {
161
+ #methods = ["get", "post", "patch", "put", "delete"];
162
+ async build(...generators) {
215
163
  const { oas } = this.context;
216
164
  const paths = oas.getPaths();
217
165
  this.operationsByMethod = Object.entries(paths).reduce((acc, [path2, method]) => {
218
166
  const methods = Object.keys(method);
219
167
  methods.forEach((method2) => {
220
168
  const operation = oas.operation(path2, method2);
221
- if (operation && __privateGet(this, _OperationGenerator_instances, methods_get)[method2]) {
222
- const isExcluded = __privateMethod(this, _OperationGenerator_instances, isExcluded_fn).call(this, operation, method2);
223
- const isIncluded = this.context.include ? __privateMethod(this, _OperationGenerator_instances, isIncluded_fn).call(this, operation, method2) : true;
169
+ if (operation && [this.#methods].some((methods2) => method2 === operation.method)) {
170
+ const isExcluded = this.#isExcluded(operation, method2);
171
+ const isIncluded = this.context.include ? this.#isIncluded(operation, method2) : true;
224
172
  if (isIncluded && !isExcluded) {
225
173
  if (!acc[path2]) {
226
174
  acc[path2] = {};
@@ -241,26 +189,53 @@ var OperationGenerator = class extends Generator {
241
189
  const methods = this.operationsByMethod[path2] ? Object.keys(this.operationsByMethod[path2]) : [];
242
190
  methods.forEach((method) => {
243
191
  const { operation } = this.operationsByMethod[path2]?.[method];
244
- const options = __privateMethod(this, _OperationGenerator_instances, getOptions_fn).call(this, operation, method);
245
- const promiseMethod = __privateGet(this, _OperationGenerator_instances, methods_get)[method]?.call(this, operation, {
246
- ...this.options,
247
- ...options
248
- });
192
+ const options = this.#getOptions(operation, method);
193
+ const methodToCall = this[method];
194
+ if (typeof methodToCall === "function") {
195
+ const promiseMethod = methodToCall?.call(this, operation, {
196
+ ...this.options,
197
+ ...options
198
+ });
199
+ if (promiseMethod) {
200
+ acc.push(promiseMethod);
201
+ }
202
+ }
249
203
  const promiseOperation = this.operation.call(this, operation, {
250
204
  ...this.options,
251
205
  ...options
252
206
  });
253
- if (promiseMethod) {
254
- acc.push(promiseMethod);
255
- }
256
207
  if (promiseOperation) {
257
208
  acc.push(promiseOperation);
258
209
  }
210
+ generators?.forEach((generator) => {
211
+ const promise = generator.operation?.({
212
+ instance: this,
213
+ operation,
214
+ options: {
215
+ ...this.options,
216
+ ...options
217
+ }
218
+ });
219
+ if (promise) {
220
+ acc.push(promise);
221
+ }
222
+ });
259
223
  });
260
224
  return acc;
261
225
  }, []);
262
226
  const operations = Object.values(this.operationsByMethod).map((item) => Object.values(item).map((item2) => item2.operation));
263
227
  promises.push(this.all(operations.flat().filter(Boolean), this.operationsByMethod));
228
+ generators?.forEach((generator) => {
229
+ const promise = generator.operations?.({
230
+ instance: this,
231
+ operations: operations.flat().filter(Boolean),
232
+ operationsByMethod: this.operationsByMethod,
233
+ options: this.options
234
+ });
235
+ if (promise) {
236
+ promises.push(promise);
237
+ }
238
+ });
264
239
  const files = await Promise.all(promises);
265
240
  return files.flat().filter(Boolean);
266
241
  }
@@ -268,134 +243,154 @@ var OperationGenerator = class extends Generator {
268
243
  * Operation
269
244
  */
270
245
  async operation(operation, options) {
271
- return null;
246
+ return [];
272
247
  }
273
248
  /**
274
249
  * GET
275
250
  */
276
251
  async get(operation, options) {
277
- return null;
252
+ return [];
278
253
  }
279
254
  /**
280
255
  * POST
281
256
  */
282
257
  async post(operation, options) {
283
- return null;
258
+ return [];
284
259
  }
285
260
  /**
286
261
  * PATCH
287
262
  */
288
263
  async patch(operation, options) {
289
- return null;
264
+ return [];
290
265
  }
291
266
  /**
292
267
  * PUT
293
268
  */
294
269
  async put(operation, options) {
295
- return null;
270
+ return [];
296
271
  }
297
272
  /**
298
273
  * DELETE
299
274
  */
300
275
  async delete(operation, options) {
301
- return null;
276
+ return [];
302
277
  }
303
278
  /**
304
279
  * Combination of GET, POST, PATCH, PUT, DELETE
305
280
  */
306
281
  async all(operations, paths) {
307
- return null;
282
+ return [];
308
283
  }
309
284
  };
310
- _operationsByMethod = new WeakMap();
311
- _OperationGenerator_instances = new WeakSet();
312
- getOptions_fn = function(operation, method) {
313
- const { override = [] } = this.context;
314
- return override.find(({ pattern, type }) => {
315
- if (type === "tag") {
316
- return !!operation.getTags()[0]?.name.match(pattern);
317
- }
318
- if (type === "operationId") {
319
- return !!operation.getOperationId().match(pattern);
320
- }
321
- if (type === "path") {
322
- return !!operation.path.match(pattern);
323
- }
324
- if (type === "method") {
325
- return !!method.match(pattern);
326
- }
327
- return false;
328
- })?.options || {};
329
- };
330
- /**
331
- *
332
- * @deprecated
333
- */
334
- isExcluded_fn = function(operation, method) {
335
- const { exclude = [] } = this.context;
336
- let matched = false;
337
- exclude.forEach(({ pattern, type }) => {
338
- if (type === "tag" && !matched) {
339
- matched = !!operation.getTags()[0]?.name.match(pattern);
340
- }
341
- if (type === "operationId" && !matched) {
342
- matched = !!operation.getOperationId().match(pattern);
343
- }
344
- if (type === "path" && !matched) {
345
- matched = !!operation.path.match(pattern);
346
- }
347
- if (type === "method" && !matched) {
348
- matched = !!method.match(pattern);
349
- }
350
- });
351
- return matched;
352
- };
353
- /**
354
- *
355
- * @deprecated
356
- */
357
- isIncluded_fn = function(operation, method) {
358
- const { include = [] } = this.context;
359
- let matched = false;
360
- include.forEach(({ pattern, type }) => {
361
- if (type === "tag" && !matched) {
362
- matched = !!operation.getTags()[0]?.name.match(pattern);
363
- }
364
- if (type === "operationId" && !matched) {
365
- matched = !!operation.getOperationId().match(pattern);
366
- }
367
- if (type === "path" && !matched) {
368
- matched = !!operation.path.match(pattern);
369
- }
370
- if (type === "method" && !matched) {
371
- matched = !!method.match(pattern);
285
+ var pluginOasName = "plugin-oas";
286
+ var pluginOas = createPlugin((options) => {
287
+ const {
288
+ output = {
289
+ path: "schemas",
290
+ export: false,
291
+ exportType: "barrelNamed"
292
+ },
293
+ experimentalFilter: filter,
294
+ experimentalSort: sort,
295
+ validate = true,
296
+ generators = [jsonGenerator],
297
+ serverIndex = 0,
298
+ contentType,
299
+ oasClass
300
+ } = options;
301
+ const getOas = async ({ config, logger, formatOptions }) => {
302
+ try {
303
+ const oas = await parseFromConfig(config, formatOptions, oasClass);
304
+ if (validate) {
305
+ await oas.valdiate();
306
+ }
307
+ return oas;
308
+ } catch (e) {
309
+ const error = e;
310
+ logger.emit("warning", error?.message);
311
+ return parseFromConfig(config, {}, oasClass);
372
312
  }
373
- });
374
- return matched;
375
- };
376
- methods_get = function() {
313
+ };
377
314
  return {
378
- get: this.get,
379
- post: this.post,
380
- patch: this.patch,
381
- put: this.put,
382
- delete: this.delete,
383
- head: void 0,
384
- options: void 0,
385
- trace: void 0
315
+ name: pluginOasName,
316
+ options: {
317
+ output,
318
+ ...options
319
+ },
320
+ context() {
321
+ const { config, logger } = this;
322
+ return {
323
+ getOas(formatOptions) {
324
+ return getOas({ config, logger, formatOptions });
325
+ },
326
+ async getSchemas({ includes } = {}) {
327
+ const oas = await this.getOas();
328
+ return getSchemas({ oas, contentType, includes });
329
+ },
330
+ async getBaseURL() {
331
+ const oasInstance = await this.getOas();
332
+ return oasInstance.api.servers?.at(serverIndex)?.url;
333
+ },
334
+ contentType
335
+ };
336
+ },
337
+ resolvePath(baseName, pathMode, options2) {
338
+ const root = path.resolve(this.config.root, this.config.output.path);
339
+ const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path));
340
+ if (mode === "single") {
341
+ return path.resolve(root, output.path);
342
+ }
343
+ return path.resolve(root, output.path, baseName);
344
+ },
345
+ async buildStart() {
346
+ if (!output) {
347
+ return;
348
+ }
349
+ const oas = await getOas({
350
+ config: this.config,
351
+ logger: this.logger,
352
+ formatOptions: {
353
+ filterSet: filter,
354
+ sortSet: sort
355
+ }
356
+ });
357
+ await oas.dereference();
358
+ const schemaGenerator = new SchemaGenerator(
359
+ {
360
+ unknownType: "unknown",
361
+ dateType: "date",
362
+ transformers: {},
363
+ ...this.plugin.options
364
+ },
365
+ {
366
+ oas,
367
+ pluginManager: this.pluginManager,
368
+ plugin: this.plugin,
369
+ contentType,
370
+ include: void 0,
371
+ override: void 0,
372
+ mode: "split",
373
+ output: output.path
374
+ }
375
+ );
376
+ const schemaFiles = await schemaGenerator.build(...generators);
377
+ await this.addFile(...schemaFiles);
378
+ const operationGenerator = new OperationGenerator(this.plugin.options, {
379
+ oas,
380
+ pluginManager: this.pluginManager,
381
+ plugin: this.plugin,
382
+ contentType,
383
+ exclude: void 0,
384
+ include: void 0,
385
+ override: void 0,
386
+ mode: "split"
387
+ });
388
+ const operationFiles = await operationGenerator.build(...generators);
389
+ await this.addFile(...operationFiles);
390
+ }
386
391
  };
387
- };
392
+ });
388
393
 
389
- // src/index.ts
390
- var definePluginDefault = pluginOas;
391
- var src_default = definePluginDefault;
392
- export {
393
- OperationGenerator,
394
- SchemaGenerator,
395
- src_default as default,
396
- isKeyword,
397
- pluginOas,
398
- pluginOasName,
399
- schemaKeywords
400
- };
394
+ export { OperationGenerator, pluginOas, pluginOasName };
395
+ //# sourceMappingURL=index.js.map
401
396
  //# sourceMappingURL=index.js.map