@orval/core 8.7.0 → 8.8.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.
- package/dist/chunk-BpYLSNr0.mjs +14 -0
- package/dist/index.d.mts +34 -3
- package/dist/index.mjs +71 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-C7Uep-_p.mjs +0 -20
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "./chunk-
|
|
1
|
+
import { t as __exportAll } from "./chunk-BpYLSNr0.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { entries, groupBy, isArray, isBoolean, isBoolean as isBoolean$1, isEmptyish, isFunction, isNullish, isNullish as isNullish$1, isNumber, isString, isString as isString$1, prop, unique, uniqueBy, uniqueWith } from "remeda";
|
|
4
4
|
import { keyword } from "esutils";
|
|
@@ -15,7 +15,6 @@ import { isDereferenced } from "@scalar/openapi-types/helpers";
|
|
|
15
15
|
import fs$1 from "fs-extra";
|
|
16
16
|
import { Parser } from "acorn";
|
|
17
17
|
import { build } from "esbuild";
|
|
18
|
-
|
|
19
18
|
//#region src/types.ts
|
|
20
19
|
const SupportedFormatter = {
|
|
21
20
|
PRETTIER: "prettier",
|
|
@@ -103,7 +102,6 @@ var ErrorWithTag = class extends Error {
|
|
|
103
102
|
this.tag = tag;
|
|
104
103
|
}
|
|
105
104
|
};
|
|
106
|
-
|
|
107
105
|
//#endregion
|
|
108
106
|
//#region src/constants.ts
|
|
109
107
|
const generalJSTypes = [
|
|
@@ -128,7 +126,6 @@ const VERBS_WITH_BODY = [
|
|
|
128
126
|
];
|
|
129
127
|
const URL_REGEX = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=.]+$/;
|
|
130
128
|
const TEMPLATE_TAG_REGEX = /\${(.+?)}/g;
|
|
131
|
-
|
|
132
129
|
//#endregion
|
|
133
130
|
//#region src/utils/assertion.ts
|
|
134
131
|
/**
|
|
@@ -176,7 +173,6 @@ function isUrl(str) {
|
|
|
176
173
|
return false;
|
|
177
174
|
}
|
|
178
175
|
}
|
|
179
|
-
|
|
180
176
|
//#endregion
|
|
181
177
|
//#region src/utils/async-reduce.ts
|
|
182
178
|
async function asyncReduce(array, reducer, initValue) {
|
|
@@ -184,7 +180,6 @@ async function asyncReduce(array, reducer, initValue) {
|
|
|
184
180
|
for (const item of array) accumulate = await reducer(accumulate, item);
|
|
185
181
|
return accumulate;
|
|
186
182
|
}
|
|
187
|
-
|
|
188
183
|
//#endregion
|
|
189
184
|
//#region src/utils/case.ts
|
|
190
185
|
const unicodes = function(s, prefix = "") {
|
|
@@ -275,7 +270,6 @@ function conventionName(name, convention) {
|
|
|
275
270
|
}
|
|
276
271
|
return nameConventionTransform(name);
|
|
277
272
|
}
|
|
278
|
-
|
|
279
273
|
//#endregion
|
|
280
274
|
//#region src/utils/compare-version.ts
|
|
281
275
|
function compareVersions(firstVersion, secondVersions, operator = ">=") {
|
|
@@ -283,7 +277,6 @@ function compareVersions(firstVersion, secondVersions, operator = ">=") {
|
|
|
283
277
|
if (firstVersion.startsWith("catalog:")) return true;
|
|
284
278
|
return compare(firstVersion.replace(/(\s(.*))/, ""), secondVersions, operator);
|
|
285
279
|
}
|
|
286
|
-
|
|
287
280
|
//#endregion
|
|
288
281
|
//#region src/utils/content-type.ts
|
|
289
282
|
const binaryApplicationTypes = new Set(["application/octet-stream", "application/pdf"]);
|
|
@@ -346,7 +339,6 @@ function filterByContentType(items, filter) {
|
|
|
346
339
|
return shouldInclude && !shouldExclude;
|
|
347
340
|
});
|
|
348
341
|
}
|
|
349
|
-
|
|
350
342
|
//#endregion
|
|
351
343
|
//#region src/utils/debug.ts
|
|
352
344
|
const filter = process.env.ORVAL_DEBUG_FILTER;
|
|
@@ -361,7 +353,6 @@ function createDebugger(ns, options = {}) {
|
|
|
361
353
|
log(msg, ...args);
|
|
362
354
|
};
|
|
363
355
|
}
|
|
364
|
-
|
|
365
356
|
//#endregion
|
|
366
357
|
//#region src/utils/doc.ts
|
|
367
358
|
const search = String.raw`\*/`;
|
|
@@ -442,7 +433,6 @@ function keyValuePairsToJsDoc(keyValues) {
|
|
|
442
433
|
doc += " */\n";
|
|
443
434
|
return doc;
|
|
444
435
|
}
|
|
445
|
-
|
|
446
436
|
//#endregion
|
|
447
437
|
//#region src/utils/dynamic-import.ts
|
|
448
438
|
const TS_MODULE_EXTENSIONS = new Set([
|
|
@@ -473,13 +463,11 @@ async function dynamicImport(toImport, from = process.cwd(), takeDefault = true)
|
|
|
473
463
|
throw new Error(`Oups... 🍻. Path: ${String(toImport)} => ${String(error)}`, { cause: error });
|
|
474
464
|
}
|
|
475
465
|
}
|
|
476
|
-
|
|
477
466
|
//#endregion
|
|
478
467
|
//#region src/utils/extension.ts
|
|
479
468
|
function getExtension(path) {
|
|
480
469
|
return path.toLowerCase().includes(".yaml") || path.toLowerCase().includes(".yml") ? "yaml" : "json";
|
|
481
470
|
}
|
|
482
|
-
|
|
483
471
|
//#endregion
|
|
484
472
|
//#region src/utils/file.ts
|
|
485
473
|
function getFileInfo(target = "", { backupFilename = "filename", extension = ".ts" } = {}) {
|
|
@@ -512,7 +500,6 @@ async function removeFilesAndEmptyFolders(patterns, dir) {
|
|
|
512
500
|
if ((await fs.promises.readdir(directory)).length === 0) await fs.promises.rmdir(directory);
|
|
513
501
|
} catch {}
|
|
514
502
|
}
|
|
515
|
-
|
|
516
503
|
//#endregion
|
|
517
504
|
//#region src/utils/file-extensions.ts
|
|
518
505
|
function getMockFileExtensionByTypeName(mock) {
|
|
@@ -521,7 +508,6 @@ function getMockFileExtensionByTypeName(mock) {
|
|
|
521
508
|
default: return "msw";
|
|
522
509
|
}
|
|
523
510
|
}
|
|
524
|
-
|
|
525
511
|
//#endregion
|
|
526
512
|
//#region src/utils/get-property-safe.ts
|
|
527
513
|
/**
|
|
@@ -543,13 +529,11 @@ function getPropertySafe(obj, propertyName) {
|
|
|
543
529
|
value: void 0
|
|
544
530
|
};
|
|
545
531
|
}
|
|
546
|
-
|
|
547
532
|
//#endregion
|
|
548
533
|
//#region src/utils/is-body-verb.ts
|
|
549
534
|
function getIsBodyVerb(verb) {
|
|
550
535
|
return VERBS_WITH_BODY.includes(verb);
|
|
551
536
|
}
|
|
552
|
-
|
|
553
537
|
//#endregion
|
|
554
538
|
//#region src/utils/logger.ts
|
|
555
539
|
const log = console.log;
|
|
@@ -666,7 +650,6 @@ function createLogger(level = "info", options = {}) {
|
|
|
666
650
|
};
|
|
667
651
|
return logger;
|
|
668
652
|
}
|
|
669
|
-
|
|
670
653
|
//#endregion
|
|
671
654
|
//#region src/utils/merge-deep.ts
|
|
672
655
|
function mergeDeep(source, target) {
|
|
@@ -680,14 +663,12 @@ function mergeDeep(source, target) {
|
|
|
680
663
|
}
|
|
681
664
|
return acc;
|
|
682
665
|
}
|
|
683
|
-
|
|
684
666
|
//#endregion
|
|
685
667
|
//#region src/utils/occurrence.ts
|
|
686
668
|
function count(str = "", key) {
|
|
687
669
|
if (!str) return 0;
|
|
688
670
|
return (str.match(new RegExp(key, "g")) ?? []).length;
|
|
689
671
|
}
|
|
690
|
-
|
|
691
672
|
//#endregion
|
|
692
673
|
//#region src/utils/path.ts
|
|
693
674
|
var path_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -697,7 +678,7 @@ var path_exports = /* @__PURE__ */ __exportAll({
|
|
|
697
678
|
joinSafe: () => joinSafe,
|
|
698
679
|
normalizeSafe: () => normalizeSafe,
|
|
699
680
|
relativeSafe: () => relativeSafe,
|
|
700
|
-
separator: () =>
|
|
681
|
+
separator: () => "/",
|
|
701
682
|
toUnix: () => toUnix
|
|
702
683
|
});
|
|
703
684
|
function toUnix(value) {
|
|
@@ -712,12 +693,11 @@ function join(...args) {
|
|
|
712
693
|
* Behaves exactly like `path.relative(from, to)`, but keeps the first meaningful "./"
|
|
713
694
|
*/
|
|
714
695
|
function relativeSafe(from, to) {
|
|
715
|
-
return normalizeSafe(
|
|
696
|
+
return normalizeSafe(`./${toUnix(nodePath.relative(toUnix(from), toUnix(to)))}`);
|
|
716
697
|
}
|
|
717
698
|
function getSchemaFileName(path) {
|
|
718
699
|
return path.replace(`.${getExtension(path)}`, "").slice(path.lastIndexOf("/") + 1);
|
|
719
700
|
}
|
|
720
|
-
const separator = "/";
|
|
721
701
|
function normalizeSafe(value) {
|
|
722
702
|
let result;
|
|
723
703
|
value = toUnix(value);
|
|
@@ -770,7 +750,6 @@ function getRelativeImportPath(importerFilePath, exporterFilePath, includeFileEx
|
|
|
770
750
|
}
|
|
771
751
|
return posixPath;
|
|
772
752
|
}
|
|
773
|
-
|
|
774
753
|
//#endregion
|
|
775
754
|
//#region src/utils/resolve-version.ts
|
|
776
755
|
function resolveInstalledVersion(packageName, fromDir) {
|
|
@@ -811,7 +790,6 @@ function resolveInstalledVersions(packageJson, fromDir) {
|
|
|
811
790
|
}
|
|
812
791
|
return resolved;
|
|
813
792
|
}
|
|
814
|
-
|
|
815
793
|
//#endregion
|
|
816
794
|
//#region src/utils/sort.ts
|
|
817
795
|
const sortByPriority = (arr) => arr.toSorted((a, b) => {
|
|
@@ -822,7 +800,6 @@ const sortByPriority = (arr) => arr.toSorted((a, b) => {
|
|
|
822
800
|
if (b.required) return 1;
|
|
823
801
|
return 0;
|
|
824
802
|
});
|
|
825
|
-
|
|
826
803
|
//#endregion
|
|
827
804
|
//#region src/utils/string.ts
|
|
828
805
|
/**
|
|
@@ -1014,14 +991,12 @@ function dedupeUnionType(unionType) {
|
|
|
1014
991
|
if (current.trim()) parts.push(current.trim());
|
|
1015
992
|
return [...new Set(parts)].join(" | ");
|
|
1016
993
|
}
|
|
1017
|
-
|
|
1018
994
|
//#endregion
|
|
1019
995
|
//#region src/utils/tsconfig.ts
|
|
1020
996
|
function isSyntheticDefaultImportsAllow(config) {
|
|
1021
997
|
if (!config) return true;
|
|
1022
998
|
return !!(config.compilerOptions?.allowSyntheticDefaultImports ?? config.compilerOptions?.esModuleInterop);
|
|
1023
999
|
}
|
|
1024
|
-
|
|
1025
1000
|
//#endregion
|
|
1026
1001
|
//#region src/getters/enum.ts
|
|
1027
1002
|
/**
|
|
@@ -1221,7 +1196,6 @@ function getCombinedEnumValue(inputs) {
|
|
|
1221
1196
|
hasNull
|
|
1222
1197
|
};
|
|
1223
1198
|
}
|
|
1224
|
-
|
|
1225
1199
|
//#endregion
|
|
1226
1200
|
//#region src/getters/ref.ts
|
|
1227
1201
|
const RefComponentSuffix = {
|
|
@@ -1267,7 +1241,6 @@ function getRefInfo($ref, context) {
|
|
|
1267
1241
|
refPaths
|
|
1268
1242
|
};
|
|
1269
1243
|
}
|
|
1270
|
-
|
|
1271
1244
|
//#endregion
|
|
1272
1245
|
//#region src/resolvers/ref.ts
|
|
1273
1246
|
const REF_NOT_FOUND_PREFIX = "Oops... 🍻. Ref not found";
|
|
@@ -1369,7 +1342,6 @@ function resolveExampleRefs(examples, context) {
|
|
|
1369
1342
|
return result;
|
|
1370
1343
|
})();
|
|
1371
1344
|
}
|
|
1372
|
-
|
|
1373
1345
|
//#endregion
|
|
1374
1346
|
//#region src/resolvers/value.ts
|
|
1375
1347
|
function resolveValue({ schema, name, context, formDataContext }) {
|
|
@@ -1415,7 +1387,6 @@ function resolveValue({ schema, name, context, formDataContext }) {
|
|
|
1415
1387
|
isRef: false
|
|
1416
1388
|
};
|
|
1417
1389
|
}
|
|
1418
|
-
|
|
1419
1390
|
//#endregion
|
|
1420
1391
|
//#region src/resolvers/object.ts
|
|
1421
1392
|
/**
|
|
@@ -1509,7 +1480,6 @@ function resolveObject({ schema, propName, combined = false, context, formDataCo
|
|
|
1509
1480
|
resolveObjectCacheMap.set(hashKey, result);
|
|
1510
1481
|
return result;
|
|
1511
1482
|
}
|
|
1512
|
-
|
|
1513
1483
|
//#endregion
|
|
1514
1484
|
//#region src/getters/array.ts
|
|
1515
1485
|
/**
|
|
@@ -1584,7 +1554,6 @@ function getArray({ schema, name, context, formDataContext }) {
|
|
|
1584
1554
|
};
|
|
1585
1555
|
else throw new Error(`All arrays must have an \`items\` key defined (name=${name}, schema=${JSON.stringify(schema)})`);
|
|
1586
1556
|
}
|
|
1587
|
-
|
|
1588
1557
|
//#endregion
|
|
1589
1558
|
//#region src/getters/res-req-types.ts
|
|
1590
1559
|
const getSchemaType = (s) => s.type;
|
|
@@ -1709,6 +1678,17 @@ function getResReqTypes(responsesOrRequests, name, context, defaultType = "unkno
|
|
|
1709
1678
|
if (mediaType.schema && isReference(mediaType.schema)) {
|
|
1710
1679
|
const { imports } = resolveSchemaRef(mediaType.schema, context);
|
|
1711
1680
|
if (imports[0]?.name) effectivePropName = imports[0].name;
|
|
1681
|
+
} else if (mediaType.schema) {
|
|
1682
|
+
const combinedRefs = getSchemaOneOf(mediaType.schema) ?? getSchemaAnyOf(mediaType.schema);
|
|
1683
|
+
if (combinedRefs) {
|
|
1684
|
+
const names = [];
|
|
1685
|
+
for (const ref of combinedRefs) {
|
|
1686
|
+
if (!isReference(ref)) continue;
|
|
1687
|
+
const refName = resolveSchemaRef(ref, context).imports[0]?.name;
|
|
1688
|
+
if (refName) names.push(refName);
|
|
1689
|
+
}
|
|
1690
|
+
if (names.length > 0) effectivePropName = names.join("");
|
|
1691
|
+
}
|
|
1712
1692
|
}
|
|
1713
1693
|
const isFormData = formDataContentTypes.has(contentType);
|
|
1714
1694
|
const resolvedValue = getResReqContentTypes({
|
|
@@ -1846,26 +1826,45 @@ function getFormDataAdditionalImports({ schemaObject, context }) {
|
|
|
1846
1826
|
function getSchemaFormDataAndUrlEncoded({ name, schemaObject, context, isRequestBodyOptional, isUrlEncoded, isRef, encoding }) {
|
|
1847
1827
|
const { schema, imports } = resolveSchemaRef(schemaObject, context);
|
|
1848
1828
|
const propName = camel(!isRef && isReference(schemaObject) ? imports[0].name : name);
|
|
1849
|
-
const additionalImports = [];
|
|
1850
1829
|
const variableName = isUrlEncoded ? "formUrlEncoded" : "formData";
|
|
1851
1830
|
let form = isUrlEncoded ? `const ${variableName} = new URLSearchParams();\n` : `const ${variableName} = new FormData();\n`;
|
|
1852
1831
|
const combinedSchemas = getSchemaCombined(schema);
|
|
1853
1832
|
if (schema.type === "object" || schema.type === void 0 && combinedSchemas) {
|
|
1854
|
-
if (combinedSchemas) {
|
|
1855
|
-
const
|
|
1833
|
+
if (combinedSchemas) if (!!getSchemaOneOf(schema) || !!getSchemaAnyOf(schema)) {
|
|
1834
|
+
const directProperties = getSchemaProperties(schema);
|
|
1835
|
+
const directKeys = directProperties ? Object.entries(directProperties).filter(([, value]) => !resolveSchemaRef(value, context).schema.readOnly).map(([key]) => key) : [];
|
|
1836
|
+
const skipLine = directKeys.length > 0 ? ` if ([${directKeys.map((k) => JSON.stringify(k)).join(", ")}].includes(key)) return;\n` : "";
|
|
1837
|
+
form += `Object.entries(${propName} ?? {}).forEach(([key, value]) => {\n`;
|
|
1838
|
+
form += skipLine;
|
|
1839
|
+
form += ` if (value !== undefined && value !== null) {\n`;
|
|
1840
|
+
form += ` if ((typeof File !== 'undefined' && value instanceof File) || value instanceof Blob) {\n`;
|
|
1841
|
+
form += ` ${variableName}.append(key, value);\n`;
|
|
1842
|
+
form += ` } else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(value)) {\n`;
|
|
1843
|
+
form += ` ${variableName}.append(key, new Blob([Uint8Array.from(value)]));\n`;
|
|
1844
|
+
form += ` } else if (Array.isArray(value)) {\n`;
|
|
1845
|
+
form += ` value.forEach(v => {\n`;
|
|
1846
|
+
form += ` if ((typeof File !== 'undefined' && v instanceof File) || v instanceof Blob) {\n`;
|
|
1847
|
+
form += ` ${variableName}.append(key, v);\n`;
|
|
1848
|
+
form += ` } else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(v)) {\n`;
|
|
1849
|
+
form += ` ${variableName}.append(key, new Blob([Uint8Array.from(v)]));\n`;
|
|
1850
|
+
form += ` } else {\n`;
|
|
1851
|
+
form += ` ${variableName}.append(key, typeof v === 'object' ? JSON.stringify(v) : String(v));\n`;
|
|
1852
|
+
form += ` }\n`;
|
|
1853
|
+
form += ` });\n`;
|
|
1854
|
+
form += ` } else if (typeof value === 'object') {\n`;
|
|
1855
|
+
form += ` ${variableName}.append(key, JSON.stringify(value));\n`;
|
|
1856
|
+
form += ` } else {\n`;
|
|
1857
|
+
form += ` ${variableName}.append(key, String(value));\n`;
|
|
1858
|
+
form += ` }\n`;
|
|
1859
|
+
form += ` }\n`;
|
|
1860
|
+
form += `});\n`;
|
|
1861
|
+
} else {
|
|
1856
1862
|
const combinedSchemasFormData = combinedSchemas.map((subSchema) => {
|
|
1857
|
-
const { schema: combinedSchema
|
|
1858
|
-
|
|
1859
|
-
let newPropDefinition = "";
|
|
1860
|
-
if (shouldCast && imports[0]) {
|
|
1861
|
-
additionalImports.push(imports[0]);
|
|
1862
|
-
newPropName = `${propName}${pascal(imports[0].name)}`;
|
|
1863
|
-
newPropDefinition = `const ${newPropName} = (${propName} as ${imports[0].name}${isRequestBodyOptional ? " | undefined" : ""});\n`;
|
|
1864
|
-
}
|
|
1865
|
-
return newPropDefinition + resolveSchemaPropertiesToFormData({
|
|
1863
|
+
const { schema: combinedSchema } = resolveSchemaRef(subSchema, context);
|
|
1864
|
+
return resolveSchemaPropertiesToFormData({
|
|
1866
1865
|
schema: combinedSchema,
|
|
1867
1866
|
variableName,
|
|
1868
|
-
propName
|
|
1867
|
+
propName,
|
|
1869
1868
|
context,
|
|
1870
1869
|
isRequestBodyOptional,
|
|
1871
1870
|
encoding
|
|
@@ -1995,7 +1994,6 @@ function resolveSchemaPropertiesToFormData({ schema, variableName, propName, con
|
|
|
1995
1994
|
}
|
|
1996
1995
|
return formDataValues;
|
|
1997
1996
|
}
|
|
1998
|
-
|
|
1999
1997
|
//#endregion
|
|
2000
1998
|
//#region src/getters/body.ts
|
|
2001
1999
|
function buildBody(filteredBodyTypes, requestBody, operationName, context) {
|
|
@@ -2070,7 +2068,6 @@ function getContentTypeSuffix(contentType) {
|
|
|
2070
2068
|
if (CONTENT_TYPE_SUFFIX_MAP[contentType]) return CONTENT_TYPE_SUFFIX_MAP[contentType];
|
|
2071
2069
|
return (contentType.split("/")[1] ?? contentType).split(/[-+.]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
2072
2070
|
}
|
|
2073
|
-
|
|
2074
2071
|
//#endregion
|
|
2075
2072
|
//#region src/getters/imports.ts
|
|
2076
2073
|
function getAliasedImports({ name, resolvedValue, context }) {
|
|
@@ -2092,28 +2089,27 @@ function getImportAliasForRefOrValue({ context, imports, resolvedValue }) {
|
|
|
2092
2089
|
if (!context.output.schemas || !resolvedValue.isRef) return resolvedValue.value;
|
|
2093
2090
|
return imports.find((imp) => imp.name === resolvedValue.value)?.alias ?? resolvedValue.value;
|
|
2094
2091
|
}
|
|
2095
|
-
|
|
2096
2092
|
//#endregion
|
|
2097
2093
|
//#region src/getters/keys.ts
|
|
2098
2094
|
function getKey(key) {
|
|
2099
2095
|
return keyword.isIdentifierNameES5(key) ? key : `'${key}'`;
|
|
2100
2096
|
}
|
|
2101
|
-
|
|
2102
2097
|
//#endregion
|
|
2103
2098
|
//#region src/getters/object.ts
|
|
2104
2099
|
/**
|
|
2105
2100
|
* Extract enum values from propertyNames schema (OpenAPI 3.1)
|
|
2106
|
-
*
|
|
2101
|
+
* Handles both `enum` and `const` (treated as a single-element enum)
|
|
2102
|
+
* Returns undefined if propertyNames has neither
|
|
2107
2103
|
*/
|
|
2108
2104
|
function getPropertyNamesEnum(item) {
|
|
2109
|
-
if ("propertyNames" in item
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2105
|
+
if (!("propertyNames" in item) || !item.propertyNames) return;
|
|
2106
|
+
const propertyNames = item.propertyNames;
|
|
2107
|
+
if (Array.isArray(propertyNames.enum)) return propertyNames.enum.filter((val) => isString(val));
|
|
2108
|
+
if (isString(propertyNames.const)) return [propertyNames.const];
|
|
2113
2109
|
}
|
|
2114
2110
|
/**
|
|
2115
|
-
* Generate index signature key type based on propertyNames enum
|
|
2116
|
-
* Returns union type string like "'foo' | 'bar'" or 'string' if
|
|
2111
|
+
* Generate index signature key type based on propertyNames enum or const
|
|
2112
|
+
* Returns union type string like "'foo' | 'bar'", "'x'", or 'string' if neither
|
|
2117
2113
|
*/
|
|
2118
2114
|
function getIndexSignatureKey(item) {
|
|
2119
2115
|
const enumValues = getPropertyNamesEnum(item);
|
|
@@ -2383,7 +2379,6 @@ function getObject({ item, name, context, nullable, formDataContext }) {
|
|
|
2383
2379
|
dependencies: []
|
|
2384
2380
|
};
|
|
2385
2381
|
}
|
|
2386
|
-
|
|
2387
2382
|
//#endregion
|
|
2388
2383
|
//#region src/getters/scalar.ts
|
|
2389
2384
|
/**
|
|
@@ -2542,7 +2537,6 @@ function getScalar({ item, name, context, formDataContext }) {
|
|
|
2542
2537
|
}
|
|
2543
2538
|
}
|
|
2544
2539
|
}
|
|
2545
|
-
|
|
2546
2540
|
//#endregion
|
|
2547
2541
|
//#region src/getters/combine.ts
|
|
2548
2542
|
const mergeableAllOfKeys = new Set([
|
|
@@ -2748,7 +2742,6 @@ function combineSchemas({ name, schema, separator, context, nullable, formDataCo
|
|
|
2748
2742
|
examples: resolveExampleRefs(schema.examples, context)
|
|
2749
2743
|
};
|
|
2750
2744
|
}
|
|
2751
|
-
|
|
2752
2745
|
//#endregion
|
|
2753
2746
|
//#region src/getters/discriminators.ts
|
|
2754
2747
|
function resolveDiscriminators(schemas, context) {
|
|
@@ -2800,7 +2793,6 @@ function resolveDiscriminators(schemas, context) {
|
|
|
2800
2793
|
}
|
|
2801
2794
|
return transformedSchemas;
|
|
2802
2795
|
}
|
|
2803
|
-
|
|
2804
2796
|
//#endregion
|
|
2805
2797
|
//#region src/getters/operation.ts
|
|
2806
2798
|
function getOperationId(operation, route, verb) {
|
|
@@ -2812,7 +2804,6 @@ function getOperationId(operation, route, verb) {
|
|
|
2812
2804
|
whitespace: "-"
|
|
2813
2805
|
}))].join("-"));
|
|
2814
2806
|
}
|
|
2815
|
-
|
|
2816
2807
|
//#endregion
|
|
2817
2808
|
//#region src/getters/parameters.ts
|
|
2818
2809
|
function getParameters({ parameters, context }) {
|
|
@@ -2835,7 +2826,6 @@ function getParameters({ parameters, context }) {
|
|
|
2835
2826
|
});
|
|
2836
2827
|
return result;
|
|
2837
2828
|
}
|
|
2838
|
-
|
|
2839
2829
|
//#endregion
|
|
2840
2830
|
//#region src/getters/params.ts
|
|
2841
2831
|
/**
|
|
@@ -2892,7 +2882,6 @@ function getParams({ route, pathParams = [], operationId, context, output }) {
|
|
|
2892
2882
|
};
|
|
2893
2883
|
});
|
|
2894
2884
|
}
|
|
2895
|
-
|
|
2896
2885
|
//#endregion
|
|
2897
2886
|
//#region src/getters/props.ts
|
|
2898
2887
|
function getProps({ body, queryParams, params, operationName, headers, context }) {
|
|
@@ -2957,7 +2946,6 @@ function getQueryParamDefinition(queryParams, context) {
|
|
|
2957
2946
|
const paramType = queryParams?.schema.name;
|
|
2958
2947
|
return `params${(queryParams?.isOptional || context.output.allParamsOptional) && !context.output.optionsParamRequired ? "?" : ""}: ${paramType}`;
|
|
2959
2948
|
}
|
|
2960
|
-
|
|
2961
2949
|
//#endregion
|
|
2962
2950
|
//#region src/getters/query-params.ts
|
|
2963
2951
|
const isOpenApiSchemaObject = (value) => {
|
|
@@ -3052,7 +3040,6 @@ function getQueryParams({ queryParams, operationName, context, suffix = "params"
|
|
|
3052
3040
|
requiredNullableKeys
|
|
3053
3041
|
};
|
|
3054
3042
|
}
|
|
3055
|
-
|
|
3056
3043
|
//#endregion
|
|
3057
3044
|
//#region src/getters/response.ts
|
|
3058
3045
|
function getResponse({ responses, operationName, context, contentType }) {
|
|
@@ -3082,7 +3069,6 @@ function getResponse({ responses, operationName, context, contentType }) {
|
|
|
3082
3069
|
originalSchema: responses
|
|
3083
3070
|
};
|
|
3084
3071
|
}
|
|
3085
|
-
|
|
3086
3072
|
//#endregion
|
|
3087
3073
|
//#region src/getters/route.ts
|
|
3088
3074
|
function isBaseUrlRuntime(baseUrl) {
|
|
@@ -3156,11 +3142,18 @@ function getFullRoute(route, servers, baseUrl) {
|
|
|
3156
3142
|
}
|
|
3157
3143
|
/**
|
|
3158
3144
|
* Returns `GeneratorImport` entries for {@link BaseUrlRuntime.imports} when `baseUrl` is a runtime config.
|
|
3145
|
+
*
|
|
3146
|
+
* Defaults `values` to true so symbols in `runtime` emit as value imports in the
|
|
3147
|
+
* generated client. Set `values: false` explicitly only for unusual cases (e.g.
|
|
3148
|
+
* type-only symbols referenced from the expression).
|
|
3159
3149
|
*/
|
|
3160
3150
|
function getBaseUrlRuntimeImports(baseUrl) {
|
|
3161
3151
|
if (!baseUrl) return [];
|
|
3162
3152
|
if (!isBaseUrlRuntime(baseUrl)) return [];
|
|
3163
|
-
return baseUrl.imports ?? []
|
|
3153
|
+
return (baseUrl.imports ?? []).map((imp) => ({
|
|
3154
|
+
...imp,
|
|
3155
|
+
values: imp.values ?? true
|
|
3156
|
+
}));
|
|
3164
3157
|
}
|
|
3165
3158
|
function getRouteAsArray(route) {
|
|
3166
3159
|
return route.split("/").filter((i) => i !== "").flatMap((segment) => {
|
|
@@ -3171,7 +3164,6 @@ function getRouteAsArray(route) {
|
|
|
3171
3164
|
});
|
|
3172
3165
|
}).join(",");
|
|
3173
3166
|
}
|
|
3174
|
-
|
|
3175
3167
|
//#endregion
|
|
3176
3168
|
//#region src/generators/component-definition.ts
|
|
3177
3169
|
function generateComponentDefinition(responses = {}, context, suffix) {
|
|
@@ -3199,7 +3191,6 @@ function generateComponentDefinition(responses = {}, context, suffix) {
|
|
|
3199
3191
|
}
|
|
3200
3192
|
return generatorSchemas;
|
|
3201
3193
|
}
|
|
3202
|
-
|
|
3203
3194
|
//#endregion
|
|
3204
3195
|
//#region src/generators/imports.ts
|
|
3205
3196
|
function generateImports({ imports, namingConvention = NamingConvention.CAMEL_CASE }) {
|
|
@@ -3334,7 +3325,6 @@ function generateVerbImports({ response, body, queryParams, props, headers, para
|
|
|
3334
3325
|
}];
|
|
3335
3326
|
});
|
|
3336
3327
|
}
|
|
3337
|
-
|
|
3338
3328
|
//#endregion
|
|
3339
3329
|
//#region src/generators/models-inline.ts
|
|
3340
3330
|
function generateModelInline(acc, model) {
|
|
@@ -3346,7 +3336,6 @@ function generateModelsInline(obj) {
|
|
|
3346
3336
|
for (const { model } of schemas) result = generateModelInline(result, model);
|
|
3347
3337
|
return result;
|
|
3348
3338
|
}
|
|
3349
|
-
|
|
3350
3339
|
//#endregion
|
|
3351
3340
|
//#region src/generators/mutator-info.ts
|
|
3352
3341
|
async function getMutatorInfo(filePath, options) {
|
|
@@ -3443,7 +3432,6 @@ function getEcmaVersion(target) {
|
|
|
3443
3432
|
return;
|
|
3444
3433
|
}
|
|
3445
3434
|
}
|
|
3446
|
-
|
|
3447
3435
|
//#endregion
|
|
3448
3436
|
//#region src/generators/mutator.ts
|
|
3449
3437
|
const BODY_TYPE_NAME = "BodyType";
|
|
@@ -3461,7 +3449,7 @@ async function generateMutator({ output, mutator, name, workspace, tsconfig }) {
|
|
|
3461
3449
|
let rawFile = await fs$1.readFile(importPath, "utf8");
|
|
3462
3450
|
rawFile = removeComments(rawFile);
|
|
3463
3451
|
const hasErrorType = rawFile.includes("export type ErrorType") || rawFile.includes("export interface ErrorType");
|
|
3464
|
-
const hasBodyType = rawFile.includes(`export type
|
|
3452
|
+
const hasBodyType = rawFile.includes(`export type BodyType`) || rawFile.includes(`export interface BodyType`);
|
|
3465
3453
|
const errorTypeName = mutator.default ? `${pascal(name)}ErrorType` : "ErrorType";
|
|
3466
3454
|
const bodyTypeName = mutator.default ? `${pascal(name)}${BODY_TYPE_NAME}` : BODY_TYPE_NAME;
|
|
3467
3455
|
const mutatorInfo = await getMutatorInfo(importPath, {
|
|
@@ -3489,7 +3477,6 @@ async function generateMutator({ output, mutator, name, workspace, tsconfig }) {
|
|
|
3489
3477
|
function removeComments(file) {
|
|
3490
3478
|
return file.replaceAll(/\/\/.*|\/\*[\s\S]*?\*\//g, "");
|
|
3491
3479
|
}
|
|
3492
|
-
|
|
3493
3480
|
//#endregion
|
|
3494
3481
|
//#region src/generators/options.ts
|
|
3495
3482
|
/**
|
|
@@ -3712,7 +3699,6 @@ function generateFormDataAndUrlEncodedFunction({ body, formData, formUrlEncoded,
|
|
|
3712
3699
|
}
|
|
3713
3700
|
return "";
|
|
3714
3701
|
}
|
|
3715
|
-
|
|
3716
3702
|
//#endregion
|
|
3717
3703
|
//#region src/generators/parameter-definition.ts
|
|
3718
3704
|
function generateParameterDefinition(parameters = {}, context, suffix) {
|
|
@@ -3756,7 +3742,6 @@ function generateParameterDefinition(parameters = {}, context, suffix) {
|
|
|
3756
3742
|
}
|
|
3757
3743
|
return generatorSchemas;
|
|
3758
3744
|
}
|
|
3759
|
-
|
|
3760
3745
|
//#endregion
|
|
3761
3746
|
//#region src/generators/interface.ts
|
|
3762
3747
|
/**
|
|
@@ -3796,7 +3781,6 @@ function generateInterface({ name, schema, context }) {
|
|
|
3796
3781
|
schema
|
|
3797
3782
|
}];
|
|
3798
3783
|
}
|
|
3799
|
-
|
|
3800
3784
|
//#endregion
|
|
3801
3785
|
//#region src/generators/schema-definition.ts
|
|
3802
3786
|
/**
|
|
@@ -3925,7 +3909,6 @@ function generateSchemaDefinitions(schemaName, schema, context, suffix) {
|
|
|
3925
3909
|
schema
|
|
3926
3910
|
}];
|
|
3927
3911
|
}
|
|
3928
|
-
|
|
3929
3912
|
//#endregion
|
|
3930
3913
|
//#region src/generators/verbs-options.ts
|
|
3931
3914
|
async function buildVerbOption({ verb, output, operation, route, pathRoute, verbParameters = [], context, body, operationName, operationId, override, tags, deprecated, description, summary }) {
|
|
@@ -4128,7 +4111,6 @@ function _filteredVerbs(verbs, filters) {
|
|
|
4128
4111
|
return filterMode === "exclude" ? !isMatch : isMatch;
|
|
4129
4112
|
});
|
|
4130
4113
|
}
|
|
4131
|
-
|
|
4132
4114
|
//#endregion
|
|
4133
4115
|
//#region src/writers/file.ts
|
|
4134
4116
|
const TRAILING_WHITESPACE_RE = /[^\S\r\n]+$/gm;
|
|
@@ -4142,7 +4124,6 @@ const TRAILING_WHITESPACE_RE = /[^\S\r\n]+$/gm;
|
|
|
4142
4124
|
async function writeGeneratedFile(filePath, content) {
|
|
4143
4125
|
await fs$1.outputFile(filePath, content.replaceAll(TRAILING_WHITESPACE_RE, ""));
|
|
4144
4126
|
}
|
|
4145
|
-
|
|
4146
4127
|
//#endregion
|
|
4147
4128
|
//#region src/writers/schemas.ts
|
|
4148
4129
|
/**
|
|
@@ -4246,7 +4227,7 @@ function normalizeCanonicalImportPaths(schemas, canonicalPathMap, canonicalNameM
|
|
|
4246
4227
|
const canonicalByPath = canonicalPathMap.get(resolvedImportKey);
|
|
4247
4228
|
const canonical = canonicalByName ?? canonicalByPath;
|
|
4248
4229
|
if (!canonical?.importPath) return imp;
|
|
4249
|
-
const importPath =
|
|
4230
|
+
const importPath = removeTSExtension(relativeSafe(schemaPath, canonical.importPath.replaceAll("\\", "/")));
|
|
4250
4231
|
return {
|
|
4251
4232
|
...imp,
|
|
4252
4233
|
importPath
|
|
@@ -4269,8 +4250,8 @@ function mergeSchemaGroup(schemas) {
|
|
|
4269
4250
|
function resolveImportKey(schemaPath, importPath, fileExtension) {
|
|
4270
4251
|
return join(schemaPath, `${importPath}${fileExtension}`).toLowerCase().replaceAll("\\", "/");
|
|
4271
4252
|
}
|
|
4272
|
-
function
|
|
4273
|
-
return path.endsWith(
|
|
4253
|
+
function removeTSExtension(path) {
|
|
4254
|
+
return path.endsWith(".ts") ? path.slice(0, -3) : path;
|
|
4274
4255
|
}
|
|
4275
4256
|
function getSchema({ schema: { imports, model }, header, namingConvention = NamingConvention.CAMEL_CASE }) {
|
|
4276
4257
|
let file = header;
|
|
@@ -4343,7 +4324,6 @@ async function writeSchemas({ schemaPath, schemas, target, namingConvention, fil
|
|
|
4343
4324
|
}
|
|
4344
4325
|
}
|
|
4345
4326
|
}
|
|
4346
|
-
|
|
4347
4327
|
//#endregion
|
|
4348
4328
|
//#region src/writers/generate-imports-for-builder.ts
|
|
4349
4329
|
function generateImportsForBuilder(output, imports, relativeSchemasPath) {
|
|
@@ -4359,10 +4339,7 @@ function generateImportsForBuilder(output, imports, relativeSchemasPath) {
|
|
|
4359
4339
|
else {
|
|
4360
4340
|
const importsByDependency = /* @__PURE__ */ new Map();
|
|
4361
4341
|
for (const schemaImport of imports.filter((i) => !i.importPath)) {
|
|
4362
|
-
const
|
|
4363
|
-
const suffix = isZodSchemaOutput ? ".zod" : "";
|
|
4364
|
-
const importExtension = output.fileExtension.replace(/\.ts$/, "") || "";
|
|
4365
|
-
const dependency = joinSafe(relativeSchemasPath, `${normalizedName}${suffix}${importExtension}`);
|
|
4342
|
+
const dependency = joinSafe(relativeSchemasPath, `${conventionName(isZodSchemaOutput ? schemaImport.name : schemaImport.schemaName ?? schemaImport.name, output.namingConvention)}${isZodSchemaOutput ? ".zod" : ""}${output.fileExtension.replace(/\.ts$/, "") || ""}`);
|
|
4366
4343
|
if (!importsByDependency.has(dependency)) importsByDependency.set(dependency, []);
|
|
4367
4344
|
importsByDependency.get(dependency)?.push(schemaImport);
|
|
4368
4345
|
}
|
|
@@ -4379,7 +4356,6 @@ function generateImportsForBuilder(output, imports, relativeSchemasPath) {
|
|
|
4379
4356
|
});
|
|
4380
4357
|
return [...schemaImports, ...otherImports];
|
|
4381
4358
|
}
|
|
4382
|
-
|
|
4383
4359
|
//#endregion
|
|
4384
4360
|
//#region src/writers/target.ts
|
|
4385
4361
|
function generateTarget(builder, options) {
|
|
@@ -4456,7 +4432,6 @@ function generateTarget(builder, options) {
|
|
|
4456
4432
|
implementationMock: target.implementationMock.function + target.implementationMock.handler
|
|
4457
4433
|
};
|
|
4458
4434
|
}
|
|
4459
|
-
|
|
4460
4435
|
//#endregion
|
|
4461
4436
|
//#region src/writers/types.ts
|
|
4462
4437
|
function getOrvalGeneratedTypes() {
|
|
@@ -4495,7 +4470,6 @@ interface TypedResponse<T> extends Response {
|
|
|
4495
4470
|
}
|
|
4496
4471
|
`;
|
|
4497
4472
|
}
|
|
4498
|
-
|
|
4499
4473
|
//#endregion
|
|
4500
4474
|
//#region src/writers/single-mode.ts
|
|
4501
4475
|
async function writeSingleMode({ builder, output, projectName, header, needSchema, generateSchemasInline }) {
|
|
@@ -4518,7 +4492,7 @@ async function writeSingleMode({ builder, output, projectName, header, needSchem
|
|
|
4518
4492
|
if (!matchingImport) continue;
|
|
4519
4493
|
if (!!mockImport.values || !!mockImport.isConstant || !!mockImport.default || !!mockImport.namespaceImport || !!mockImport.syntheticDefaultImport) matchingImport.values = true;
|
|
4520
4494
|
}
|
|
4521
|
-
const importsForBuilder = schemasPath ? generateImportsForBuilder(output, normalizedImports, schemasPath) :
|
|
4495
|
+
const importsForBuilder = schemasPath ? generateImportsForBuilder(output, normalizedImports, schemasPath) : generateImportsForBuilder(output, normalizedImports.filter((imp) => !!imp.importPath), ".");
|
|
4522
4496
|
data += builder.imports({
|
|
4523
4497
|
client: output.client,
|
|
4524
4498
|
implementation,
|
|
@@ -4533,7 +4507,8 @@ async function writeSingleMode({ builder, output, projectName, header, needSchem
|
|
|
4533
4507
|
output
|
|
4534
4508
|
});
|
|
4535
4509
|
if (output.mock) {
|
|
4536
|
-
const
|
|
4510
|
+
const filteredMockImports = importsMock.filter((impMock) => !normalizedImports.some((imp) => imp.name === impMock.name && (imp.alias ?? "") === (impMock.alias ?? "")));
|
|
4511
|
+
const importsMockForBuilder = schemasPath ? generateImportsForBuilder(output, filteredMockImports, schemasPath) : generateImportsForBuilder(output, filteredMockImports.filter((imp) => !!imp.importPath), ".");
|
|
4537
4512
|
data += builder.importsMock({
|
|
4538
4513
|
implementation: implementationMock,
|
|
4539
4514
|
imports: importsMockForBuilder,
|
|
@@ -4573,7 +4548,6 @@ async function writeSingleMode({ builder, output, projectName, header, needSchem
|
|
|
4573
4548
|
throw new Error(`Oups... 🍻. An Error occurred while writing file => ${errorMsg}`, { cause: error });
|
|
4574
4549
|
}
|
|
4575
4550
|
}
|
|
4576
|
-
|
|
4577
4551
|
//#endregion
|
|
4578
4552
|
//#region src/writers/split-mode.ts
|
|
4579
4553
|
async function writeSplitMode({ builder, output, projectName, header, needSchema, generateSchemasInline }) {
|
|
@@ -4645,7 +4619,6 @@ async function writeSplitMode({ builder, output, projectName, header, needSchema
|
|
|
4645
4619
|
throw new Error(`Oups... 🍻. An Error occurred while splitting => ${String(error)}`, { cause: error });
|
|
4646
4620
|
}
|
|
4647
4621
|
}
|
|
4648
|
-
|
|
4649
4622
|
//#endregion
|
|
4650
4623
|
//#region src/writers/target-tags.ts
|
|
4651
4624
|
function addDefaultTagIfEmpty(operation) {
|
|
@@ -4760,7 +4733,6 @@ function generateTargetForTags(builder, options) {
|
|
|
4760
4733
|
};
|
|
4761
4734
|
return result;
|
|
4762
4735
|
}
|
|
4763
|
-
|
|
4764
4736
|
//#endregion
|
|
4765
4737
|
//#region src/writers/split-tags-mode.ts
|
|
4766
4738
|
async function writeSplitTagsMode({ builder, output, projectName, header, needSchema, generateSchemasInline }) {
|
|
@@ -4881,7 +4853,6 @@ async function writeSplitTagsMode({ builder, output, projectName, header, needSc
|
|
|
4881
4853
|
}
|
|
4882
4854
|
return [...new Set([...indexFilePath ? [indexFilePath] : [], ...generatedFilePathsArray.flat()])];
|
|
4883
4855
|
}
|
|
4884
|
-
|
|
4885
4856
|
//#endregion
|
|
4886
4857
|
//#region src/writers/tags-mode.ts
|
|
4887
4858
|
async function writeTagsMode({ builder, output, projectName, header, needSchema, generateSchemasInline }) {
|
|
@@ -4964,7 +4935,7 @@ async function writeTagsMode({ builder, output, projectName, header, needSchema,
|
|
|
4964
4935
|
}
|
|
4965
4936
|
}))).flat();
|
|
4966
4937
|
}
|
|
4967
|
-
|
|
4968
4938
|
//#endregion
|
|
4969
4939
|
export { BODY_TYPE_NAME, EnumGeneration, ErrorWithTag, FormDataArrayHandling, GetterPropType, LogLevels, NamingConvention, OutputClient, OutputHttpClient, OutputMockType, OutputMode, PropertySortOrder, RefComponentSuffix, SchemaType, SupportedFormatter, TEMPLATE_TAG_REGEX, URL_REGEX, VERBS_WITH_BODY, Verbs, _filteredVerbs, addDependency, asyncReduce, camel, combineSchemas, compareVersions, conventionName, count, createDebugger, createLogger, createSuccessMessage, createTypeAliasIfNeeded, dedupeUnionType, dynamicImport, escape, escapeRegExp, filterByContentType, fixCrossDirectoryImports, fixRegularSchemaImports, generalJSTypes, generalJSTypesWithArray, generateAxiosOptions, generateBodyMutatorConfig, generateBodyOptions, generateComponentDefinition, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateImports, generateModelInline, generateModelsInline, generateMutator, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateParameterDefinition, generateQueryParamsAxiosConfig, generateSchemasDefinition, generateTarget, generateTargetForTags, generateVerbImports, generateVerbOptions, generateVerbsOptions, getAngularFilteredParamsCallExpression, getAngularFilteredParamsExpression, getAngularFilteredParamsHelperBody, getArray, getBaseUrlRuntimeImports, getBodiesByContentType, getBody, getCombinedEnumValue, getDefaultContentType, getEnum, getEnumDescriptions, getEnumImplementation, getEnumNames, getEnumUnionFromSchema, getExtension, getFileInfo, getFormDataFieldFileType, getFullRoute, getIsBodyVerb, getKey, getMockFileExtensionByTypeName, getNumberWord, getObject, getOperationId, getOrvalGeneratedTypes, getParameters, getParams, getParamsInPath, getPropertySafe, getProps, getQueryParams, getRefInfo, getResReqTypes, getResponse, getResponseTypeCategory, getRoute, getRouteAsArray, getScalar, getSuccessResponseType, getTypedResponse, getWarningCount, isBinaryContentType, isBoolean, isDirectory, isFunction, isModule, isNullish, isNumber, isNumeric, isObject, isReference, isSchema, isString, isStringLike, isSyntheticDefaultImportsAllow, isUrl, isVerb, isVerbose, jsDoc, jsStringEscape, kebab, keyValuePairsToJsDoc, log, logError, logVerbose, logWarning, mergeDeep, mismatchArgsMessage, pascal, removeFilesAndEmptyFolders, resetWarnings, resolveDiscriminators, resolveExampleRefs, resolveInstalledVersion, resolveInstalledVersions, resolveObject, resolveRef, resolveValue, sanitize, setVerbose, snake, sortByPriority, splitSchemasByType, startMessage, stringify, toObjectString, path_exports as upath, upper, writeModelInline, writeModelsInline, writeSchema, writeSchemas, writeSingleMode, writeSplitMode, writeSplitTagsMode, writeTagsMode };
|
|
4940
|
+
|
|
4970
4941
|
//# sourceMappingURL=index.mjs.map
|