@orval/core 7.9.0 → 7.10.0
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/index.d.ts +82 -65
- package/dist/index.js +96 -39
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import SwaggerParser from '@apidevtools/swagger-parser';
|
|
2
2
|
import { allLocales } from '@faker-js/faker';
|
|
3
|
-
import
|
|
4
|
-
import { InfoObject, OperationObject, OpenAPIObject, ResponsesObject, ReferenceObject, RequestBodyObject, ParameterObject, SchemaObject, ComponentsObject, SchemasObject, PathItemObject, ResponseObject, ExampleObject } from 'openapi3-ts/oas30';
|
|
3
|
+
import { OpenAPIObject, SchemaObject, ResponsesObject, ReferenceObject, RequestBodyObject, OperationObject, InfoObject, ParameterObject, ComponentsObject, SchemasObject, PathItemObject, ResponseObject, ExampleObject } from 'openapi3-ts/oas30';
|
|
5
4
|
import swagger2openapi from 'swagger2openapi';
|
|
6
5
|
import { TypeDocOptions } from 'typedoc';
|
|
7
6
|
import { SchemaObject as SchemaObject$1 } from 'openapi3-ts/dist/model/openapi30';
|
|
@@ -108,6 +107,7 @@ type NormalizedOverrideOutput = {
|
|
|
108
107
|
useNamedParameters?: boolean;
|
|
109
108
|
enumGenerationType: EnumGeneration;
|
|
110
109
|
suppressReadonlyModifier?: boolean;
|
|
110
|
+
jsDoc: NormalizedJsDocOptions;
|
|
111
111
|
};
|
|
112
112
|
type NormalizedMutator = {
|
|
113
113
|
path: string;
|
|
@@ -265,9 +265,14 @@ type GlobalMockOptions = {
|
|
|
265
265
|
type OverrideMockOptions = Partial<GlobalMockOptions> & {
|
|
266
266
|
arrayMin?: number;
|
|
267
267
|
arrayMax?: number;
|
|
268
|
+
stringMin?: number;
|
|
269
|
+
stringMax?: number;
|
|
270
|
+
numberMin?: number;
|
|
271
|
+
numberMax?: number;
|
|
268
272
|
required?: boolean;
|
|
269
273
|
properties?: MockProperties;
|
|
270
274
|
format?: Record<string, unknown>;
|
|
275
|
+
fractionDigits?: number;
|
|
271
276
|
};
|
|
272
277
|
type MockOptions = Omit<OverrideMockOptions, 'properties'> & {
|
|
273
278
|
properties?: Record<string, unknown>;
|
|
@@ -376,6 +381,19 @@ type OverrideOutput = {
|
|
|
376
381
|
useNativeEnums?: boolean;
|
|
377
382
|
enumGenerationType?: EnumGeneration;
|
|
378
383
|
suppressReadonlyModifier?: boolean;
|
|
384
|
+
jsDoc?: JsDocOptions;
|
|
385
|
+
};
|
|
386
|
+
type JsDocOptions = {
|
|
387
|
+
filter?: (schema: Record<string, any>) => {
|
|
388
|
+
key: string;
|
|
389
|
+
value: string;
|
|
390
|
+
}[];
|
|
391
|
+
};
|
|
392
|
+
type NormalizedJsDocOptions = {
|
|
393
|
+
filter?: (schema: Record<string, any>) => {
|
|
394
|
+
key: string;
|
|
395
|
+
value: string;
|
|
396
|
+
}[];
|
|
379
397
|
};
|
|
380
398
|
type OverrideOutputContentType = {
|
|
381
399
|
include?: string[];
|
|
@@ -988,7 +1006,7 @@ declare const VERBS_WITH_BODY: Verbs[];
|
|
|
988
1006
|
declare const URL_REGEX: RegExp;
|
|
989
1007
|
declare const TEMPLATE_TAG_REGEX: RegExp;
|
|
990
1008
|
|
|
991
|
-
declare const generateComponentDefinition: (responses: ComponentsObject[
|
|
1009
|
+
declare const generateComponentDefinition: (responses: ComponentsObject["responses"] | ComponentsObject["requestBodies"], context: ContextSpecs, suffix: string) => GeneratorSchema[];
|
|
992
1010
|
|
|
993
1011
|
declare const generateImports: ({ imports, target, isRootKey, specsName, specKey: currentSpecKey, namingConvention, }: {
|
|
994
1012
|
imports: GeneratorImport[];
|
|
@@ -996,12 +1014,12 @@ declare const generateImports: ({ imports, target, isRootKey, specsName, specKey
|
|
|
996
1014
|
isRootKey: boolean;
|
|
997
1015
|
specsName: Record<string, string>;
|
|
998
1016
|
specKey: string;
|
|
999
|
-
namingConvention?: NamingConvention
|
|
1017
|
+
namingConvention?: NamingConvention;
|
|
1000
1018
|
}) => string;
|
|
1001
1019
|
declare const generateMutatorImports: ({ mutators, implementation, oneMore, }: {
|
|
1002
1020
|
mutators: GeneratorMutator[];
|
|
1003
|
-
implementation?: string
|
|
1004
|
-
oneMore?: boolean
|
|
1021
|
+
implementation?: string;
|
|
1022
|
+
oneMore?: boolean;
|
|
1005
1023
|
}) => string;
|
|
1006
1024
|
declare const addDependency: ({ implementation, exports, dependency, specsName, hasSchemaDir, isAllowSyntheticDefaultImports, }: {
|
|
1007
1025
|
implementation: string;
|
|
@@ -1022,67 +1040,67 @@ declare const generateModelsInline: (obj: Record<string, GeneratorSchema[]>) =>
|
|
|
1022
1040
|
|
|
1023
1041
|
declare const BODY_TYPE_NAME = "BodyType";
|
|
1024
1042
|
declare const generateMutator: ({ output, mutator, name, workspace, tsconfig, }: {
|
|
1025
|
-
output?: string
|
|
1026
|
-
mutator?: NormalizedMutator
|
|
1043
|
+
output?: string;
|
|
1044
|
+
mutator?: NormalizedMutator;
|
|
1027
1045
|
name: string;
|
|
1028
1046
|
workspace: string;
|
|
1029
|
-
tsconfig?: Tsconfig
|
|
1047
|
+
tsconfig?: Tsconfig;
|
|
1030
1048
|
}) => Promise<GeneratorMutator | undefined>;
|
|
1031
1049
|
|
|
1032
1050
|
declare const generateBodyOptions: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
1033
1051
|
declare const generateAxiosOptions: ({ response, isExactOptionalPropertyTypes, queryParams, headers, requestOptions, hasSignal, isVue, paramsSerializer, paramsSerializerOptions, }: {
|
|
1034
1052
|
response: GetterResponse;
|
|
1035
1053
|
isExactOptionalPropertyTypes: boolean;
|
|
1036
|
-
queryParams?: GeneratorSchema
|
|
1037
|
-
headers?: GeneratorSchema
|
|
1038
|
-
requestOptions?:
|
|
1054
|
+
queryParams?: GeneratorSchema;
|
|
1055
|
+
headers?: GeneratorSchema;
|
|
1056
|
+
requestOptions?: object | boolean;
|
|
1039
1057
|
hasSignal: boolean;
|
|
1040
1058
|
isVue: boolean;
|
|
1041
|
-
paramsSerializer?: GeneratorMutator
|
|
1042
|
-
paramsSerializerOptions?: ParamsSerializerOptions
|
|
1059
|
+
paramsSerializer?: GeneratorMutator;
|
|
1060
|
+
paramsSerializerOptions?: ParamsSerializerOptions;
|
|
1043
1061
|
}) => string;
|
|
1044
1062
|
declare const generateOptions: ({ route, body, headers, queryParams, response, verb, requestOptions, isFormData, isFormUrlEncoded, isAngular, isExactOptionalPropertyTypes, hasSignal, isVue, paramsSerializer, paramsSerializerOptions, }: {
|
|
1045
1063
|
route: string;
|
|
1046
1064
|
body: GetterBody;
|
|
1047
|
-
headers?: GetterQueryParam
|
|
1048
|
-
queryParams?: GetterQueryParam
|
|
1065
|
+
headers?: GetterQueryParam;
|
|
1066
|
+
queryParams?: GetterQueryParam;
|
|
1049
1067
|
response: GetterResponse;
|
|
1050
1068
|
verb: Verbs;
|
|
1051
|
-
requestOptions?:
|
|
1069
|
+
requestOptions?: object | boolean;
|
|
1052
1070
|
isFormData: boolean;
|
|
1053
1071
|
isFormUrlEncoded: boolean;
|
|
1054
|
-
isAngular?: boolean
|
|
1072
|
+
isAngular?: boolean;
|
|
1055
1073
|
isExactOptionalPropertyTypes: boolean;
|
|
1056
1074
|
hasSignal: boolean;
|
|
1057
|
-
isVue?: boolean
|
|
1058
|
-
paramsSerializer?: GeneratorMutator
|
|
1059
|
-
paramsSerializerOptions?: ParamsSerializerOptions
|
|
1075
|
+
isVue?: boolean;
|
|
1076
|
+
paramsSerializer?: GeneratorMutator;
|
|
1077
|
+
paramsSerializerOptions?: ParamsSerializerOptions;
|
|
1060
1078
|
}) => string;
|
|
1061
1079
|
declare const generateBodyMutatorConfig: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
1062
1080
|
declare const generateQueryParamsAxiosConfig: (response: GetterResponse, isVue: boolean, queryParams?: GetterQueryParam) => string;
|
|
1063
1081
|
declare const generateMutatorConfig: ({ route, body, headers, queryParams, response, verb, isFormData, isFormUrlEncoded, hasSignal, isExactOptionalPropertyTypes, isVue, }: {
|
|
1064
1082
|
route: string;
|
|
1065
1083
|
body: GetterBody;
|
|
1066
|
-
headers?: GetterQueryParam
|
|
1067
|
-
queryParams?: GetterQueryParam
|
|
1084
|
+
headers?: GetterQueryParam;
|
|
1085
|
+
queryParams?: GetterQueryParam;
|
|
1068
1086
|
response: GetterResponse;
|
|
1069
1087
|
verb: Verbs;
|
|
1070
1088
|
isFormData: boolean;
|
|
1071
1089
|
isFormUrlEncoded: boolean;
|
|
1072
1090
|
hasSignal: boolean;
|
|
1073
1091
|
isExactOptionalPropertyTypes: boolean;
|
|
1074
|
-
isVue?: boolean
|
|
1092
|
+
isVue?: boolean;
|
|
1075
1093
|
}) => string;
|
|
1076
1094
|
declare const generateMutatorRequestOptions: (requestOptions: boolean | object | undefined, hasSecondArgument: boolean) => string;
|
|
1077
1095
|
declare const generateFormDataAndUrlEncodedFunction: ({ body, formData, formUrlEncoded, isFormData, isFormUrlEncoded, }: {
|
|
1078
1096
|
body: GetterBody;
|
|
1079
|
-
formData?: GeneratorMutator
|
|
1080
|
-
formUrlEncoded?: GeneratorMutator
|
|
1097
|
+
formData?: GeneratorMutator;
|
|
1098
|
+
formUrlEncoded?: GeneratorMutator;
|
|
1081
1099
|
isFormData: boolean;
|
|
1082
1100
|
isFormUrlEncoded: boolean;
|
|
1083
1101
|
}) => string;
|
|
1084
1102
|
|
|
1085
|
-
declare const generateParameterDefinition: (parameters: ComponentsObject[
|
|
1103
|
+
declare const generateParameterDefinition: (parameters: ComponentsObject["parameters"], context: ContextSpecs, suffix: string) => GeneratorSchema[];
|
|
1086
1104
|
|
|
1087
1105
|
/**
|
|
1088
1106
|
* Extract all types from #/components/schemas
|
|
@@ -1099,7 +1117,7 @@ declare const generateVerbsOptions: ({ verbs, input, output, route, pathRoute, c
|
|
|
1099
1117
|
pathRoute: string;
|
|
1100
1118
|
context: ContextSpecs;
|
|
1101
1119
|
}) => Promise<GeneratorVerbsOptions>;
|
|
1102
|
-
declare const _filteredVerbs: (verbs: PathItemObject, filters: NormalizedInputOptions[
|
|
1120
|
+
declare const _filteredVerbs: (verbs: PathItemObject, filters: NormalizedInputOptions["filters"]) => [string, any][];
|
|
1103
1121
|
|
|
1104
1122
|
/**
|
|
1105
1123
|
* Return the output type from an array
|
|
@@ -1108,7 +1126,7 @@ declare const _filteredVerbs: (verbs: PathItemObject, filters: NormalizedInputOp
|
|
|
1108
1126
|
*/
|
|
1109
1127
|
declare const getArray: ({ schema, name, context, }: {
|
|
1110
1128
|
schema: SchemaObject;
|
|
1111
|
-
name?: string
|
|
1129
|
+
name?: string;
|
|
1112
1130
|
context: ContextSpecs;
|
|
1113
1131
|
}) => ScalarValue;
|
|
1114
1132
|
|
|
@@ -1116,12 +1134,12 @@ declare const getBody: ({ requestBody, operationName, context, contentType, }: {
|
|
|
1116
1134
|
requestBody: ReferenceObject | RequestBodyObject;
|
|
1117
1135
|
operationName: string;
|
|
1118
1136
|
context: ContextSpecs;
|
|
1119
|
-
contentType?: OverrideOutputContentType
|
|
1137
|
+
contentType?: OverrideOutputContentType;
|
|
1120
1138
|
}) => GetterBody;
|
|
1121
1139
|
|
|
1122
1140
|
type Separator = 'allOf' | 'anyOf' | 'oneOf';
|
|
1123
1141
|
declare const combineSchemas: ({ name, schema, separator, context, nullable, }: {
|
|
1124
|
-
name?: string
|
|
1142
|
+
name?: string;
|
|
1125
1143
|
schema: SchemaObject;
|
|
1126
1144
|
separator: Separator;
|
|
1127
1145
|
context: ContextSpecs;
|
|
@@ -1131,8 +1149,9 @@ declare const combineSchemas: ({ name, schema, separator, context, nullable, }:
|
|
|
1131
1149
|
declare const resolveDiscriminators: (schemas: SchemasObject, context: ContextSpecs) => SchemasObject;
|
|
1132
1150
|
|
|
1133
1151
|
declare const getEnumNames: (schemaObject: SchemaObject$1 | undefined) => any;
|
|
1134
|
-
declare const
|
|
1135
|
-
declare const
|
|
1152
|
+
declare const getEnumDescriptions: (schemaObject: SchemaObject$1 | undefined) => any;
|
|
1153
|
+
declare const getEnum: (value: string, enumName: string, names: string[] | undefined, enumGenerationType: EnumGeneration, descriptions?: string[]) => string;
|
|
1154
|
+
declare const getEnumImplementation: (value: string, names?: string[], descriptions?: string[]) => string;
|
|
1136
1155
|
|
|
1137
1156
|
declare const getKey: (key: string) => string;
|
|
1138
1157
|
|
|
@@ -1143,7 +1162,7 @@ declare const getKey: (key: string) => string;
|
|
|
1143
1162
|
*/
|
|
1144
1163
|
declare const getObject: ({ item, name, context, nullable, }: {
|
|
1145
1164
|
item: SchemaObject;
|
|
1146
|
-
name?: string
|
|
1165
|
+
name?: string;
|
|
1147
1166
|
context: ContextSpecs;
|
|
1148
1167
|
nullable: string;
|
|
1149
1168
|
}) => ScalarValue;
|
|
@@ -1168,10 +1187,7 @@ declare const getParameters: ({ parameters, context, }: {
|
|
|
1168
1187
|
declare const getParamsInPath: (path: string) => string[];
|
|
1169
1188
|
declare const getParams: ({ route, pathParams, operationId, context, output, }: {
|
|
1170
1189
|
route: string;
|
|
1171
|
-
pathParams?:
|
|
1172
|
-
parameter: openapi3_ts_oas30.ParameterObject;
|
|
1173
|
-
imports: GeneratorImport[];
|
|
1174
|
-
}[] | undefined;
|
|
1190
|
+
pathParams?: GetterParameters["query"];
|
|
1175
1191
|
operationId: string;
|
|
1176
1192
|
context: ContextSpecs;
|
|
1177
1193
|
output: NormalizedOutputOptions;
|
|
@@ -1179,18 +1195,18 @@ declare const getParams: ({ route, pathParams, operationId, context, output, }:
|
|
|
1179
1195
|
|
|
1180
1196
|
declare const getProps: ({ body, queryParams, params, operationName, headers, context, }: {
|
|
1181
1197
|
body: GetterBody;
|
|
1182
|
-
queryParams?: GetterQueryParam
|
|
1198
|
+
queryParams?: GetterQueryParam;
|
|
1183
1199
|
params: GetterParams;
|
|
1184
1200
|
operationName: string;
|
|
1185
|
-
headers?: GetterQueryParam
|
|
1201
|
+
headers?: GetterQueryParam;
|
|
1186
1202
|
context: ContextSpecs;
|
|
1187
1203
|
}) => GetterProps;
|
|
1188
1204
|
|
|
1189
1205
|
declare const getQueryParams: ({ queryParams, operationName, context, suffix, }: {
|
|
1190
|
-
queryParams: GetterParameters[
|
|
1206
|
+
queryParams: GetterParameters["query"];
|
|
1191
1207
|
operationName: string;
|
|
1192
1208
|
context: ContextSpecs;
|
|
1193
|
-
suffix?: string
|
|
1209
|
+
suffix?: string;
|
|
1194
1210
|
}) => GetterQueryParam | undefined;
|
|
1195
1211
|
|
|
1196
1212
|
type RefComponent = 'schemas' | 'responses' | 'parameters' | 'requestBodies';
|
|
@@ -1212,18 +1228,15 @@ interface RefInfo {
|
|
|
1212
1228
|
*
|
|
1213
1229
|
* @param $ref
|
|
1214
1230
|
*/
|
|
1215
|
-
declare const getRefInfo: ($ref: ReferenceObject[
|
|
1231
|
+
declare const getRefInfo: ($ref: ReferenceObject["$ref"], context: ContextSpecs) => RefInfo;
|
|
1216
1232
|
|
|
1217
|
-
declare const getResReqTypes: (responsesOrRequests: Array<[
|
|
1218
|
-
string,
|
|
1219
|
-
ResponseObject | ReferenceObject | RequestBodyObject
|
|
1220
|
-
]>, name: string, context: ContextSpecs, defaultType?: string, uniqueKey?: ValueIteratee<ResReqTypesValue>) => ResReqTypesValue[];
|
|
1233
|
+
declare const getResReqTypes: (responsesOrRequests: Array<[string, ResponseObject | ReferenceObject | RequestBodyObject]>, name: string, context: ContextSpecs, defaultType?: string, uniqueKey?: ValueIteratee<ResReqTypesValue>) => ResReqTypesValue[];
|
|
1221
1234
|
|
|
1222
1235
|
declare const getResponse: ({ responses, operationName, context, contentType, }: {
|
|
1223
1236
|
responses: ResponsesObject;
|
|
1224
1237
|
operationName: string;
|
|
1225
1238
|
context: ContextSpecs;
|
|
1226
|
-
contentType?: OverrideOutputContentType
|
|
1239
|
+
contentType?: OverrideOutputContentType;
|
|
1227
1240
|
}) => GetterResponse;
|
|
1228
1241
|
|
|
1229
1242
|
declare const getRoute: (route: string) => string;
|
|
@@ -1238,14 +1251,14 @@ declare const getRouteAsArray: (route: string) => string;
|
|
|
1238
1251
|
*/
|
|
1239
1252
|
declare const getScalar: ({ item, name, context, }: {
|
|
1240
1253
|
item: SchemaObject;
|
|
1241
|
-
name?: string
|
|
1254
|
+
name?: string;
|
|
1242
1255
|
context: ContextSpecs;
|
|
1243
1256
|
}) => ScalarValue;
|
|
1244
1257
|
|
|
1245
1258
|
declare const resolveObject: ({ schema, propName, combined, context, }: {
|
|
1246
1259
|
schema: SchemaObject | ReferenceObject;
|
|
1247
|
-
propName?: string
|
|
1248
|
-
combined?: boolean
|
|
1260
|
+
propName?: string;
|
|
1261
|
+
combined?: boolean;
|
|
1249
1262
|
context: ContextSpecs;
|
|
1250
1263
|
}) => ResolverValue;
|
|
1251
1264
|
|
|
@@ -1260,7 +1273,7 @@ declare const resolveExampleRefs: (examples: Examples, context: ContextSpecs) =>
|
|
|
1260
1273
|
|
|
1261
1274
|
declare const resolveValue: ({ schema, name, context, }: {
|
|
1262
1275
|
schema: SchemaObject | ReferenceObject;
|
|
1263
|
-
name?: string
|
|
1276
|
+
name?: string;
|
|
1264
1277
|
context: ContextSpecs;
|
|
1265
1278
|
}) => ResolverValue;
|
|
1266
1279
|
|
|
@@ -1301,7 +1314,7 @@ interface DebuggerOptions {
|
|
|
1301
1314
|
}
|
|
1302
1315
|
declare function createDebugger(ns: string, options?: DebuggerOptions): debug.Debugger['log'];
|
|
1303
1316
|
|
|
1304
|
-
declare function jsDoc(
|
|
1317
|
+
declare function jsDoc(schema: {
|
|
1305
1318
|
description?: string[] | string;
|
|
1306
1319
|
deprecated?: boolean;
|
|
1307
1320
|
summary?: string;
|
|
@@ -1315,9 +1328,13 @@ declare function jsDoc({ description, deprecated, summary, minLength, maxLength,
|
|
|
1315
1328
|
maxItems?: number;
|
|
1316
1329
|
nullable?: boolean;
|
|
1317
1330
|
pattern?: string;
|
|
1318
|
-
}, tryOneLine?: boolean): string;
|
|
1331
|
+
}, tryOneLine?: boolean, context?: ContextSpecs): string;
|
|
1332
|
+
declare function keyValuePairsToJsDoc(keyValues: {
|
|
1333
|
+
key: string;
|
|
1334
|
+
value: string;
|
|
1335
|
+
}[]): string;
|
|
1319
1336
|
|
|
1320
|
-
declare const dynamicImport: <T>(toImport:
|
|
1337
|
+
declare const dynamicImport: <T>(toImport: T | string, from?: string, takeDefault?: boolean) => Promise<T>;
|
|
1321
1338
|
|
|
1322
1339
|
declare const getExtension: (path: string) => "yaml" | "json";
|
|
1323
1340
|
|
|
@@ -1363,8 +1380,8 @@ interface LoggerOptions {
|
|
|
1363
1380
|
declare function createLogger(level?: LogLevel, options?: LoggerOptions): Logger;
|
|
1364
1381
|
|
|
1365
1382
|
declare const getFileInfo: (target?: string, { backupFilename, extension, }?: {
|
|
1366
|
-
backupFilename?: string
|
|
1367
|
-
extension?: string
|
|
1383
|
+
backupFilename?: string;
|
|
1384
|
+
extension?: string;
|
|
1368
1385
|
}) => {
|
|
1369
1386
|
path: string;
|
|
1370
1387
|
pathWithoutExtension: string;
|
|
@@ -1401,7 +1418,7 @@ declare const join: (...paths: string[]) => string;
|
|
|
1401
1418
|
declare const resolve: (...paths: string[]) => string;
|
|
1402
1419
|
declare const extname: (path: string) => string;
|
|
1403
1420
|
declare const dirname: (path: string) => string;
|
|
1404
|
-
declare const basename: (path: string, suffix?: string
|
|
1421
|
+
declare const basename: (path: string, suffix?: string) => string;
|
|
1405
1422
|
declare const isAbsolute: (path: string) => boolean;
|
|
1406
1423
|
|
|
1407
1424
|
/**
|
|
@@ -1431,16 +1448,16 @@ declare namespace path {
|
|
|
1431
1448
|
}
|
|
1432
1449
|
|
|
1433
1450
|
declare const sortByPriority: <T>(arr: (T & {
|
|
1434
|
-
default?: boolean
|
|
1435
|
-
required?: boolean
|
|
1451
|
+
default?: boolean;
|
|
1452
|
+
required?: boolean;
|
|
1436
1453
|
})[]) => (T & {
|
|
1437
|
-
default?: boolean
|
|
1438
|
-
required?: boolean
|
|
1454
|
+
default?: boolean;
|
|
1455
|
+
required?: boolean;
|
|
1439
1456
|
})[];
|
|
1440
1457
|
|
|
1441
1458
|
declare const stringify: (data?: string | any[] | {
|
|
1442
1459
|
[key: string]: any;
|
|
1443
|
-
}
|
|
1460
|
+
}) => string | undefined;
|
|
1444
1461
|
declare const sanitize: (value: string, options?: {
|
|
1445
1462
|
whitespace?: string | true;
|
|
1446
1463
|
underscore?: string | true;
|
|
@@ -1450,7 +1467,7 @@ declare const sanitize: (value: string, options?: {
|
|
|
1450
1467
|
es5IdentifierName?: boolean;
|
|
1451
1468
|
special?: boolean;
|
|
1452
1469
|
}) => string;
|
|
1453
|
-
declare const toObjectString: <T>(props: T[], path?: keyof T
|
|
1470
|
+
declare const toObjectString: <T>(props: T[], path?: keyof T) => string;
|
|
1454
1471
|
declare const getNumberWord: (num: number) => string;
|
|
1455
1472
|
declare const escape: (str: string | null, char?: string) => string | undefined;
|
|
1456
1473
|
/**
|
|
@@ -1515,4 +1532,4 @@ declare const generateTarget: (builder: WriteSpecsBuilder, options: NormalizedOu
|
|
|
1515
1532
|
|
|
1516
1533
|
declare const generateTargetForTags: (builder: WriteSpecsBuilder, options: NormalizedOutputOptions) => Record<string, GeneratorTarget>;
|
|
1517
1534
|
|
|
1518
|
-
export { type AngularOptions, BODY_TYPE_NAME, type BaseUrlFromConstant, type BaseUrlFromSpec, type ClientBuilder, type ClientDependenciesBuilder, type ClientExtraFilesBuilder, type ClientFileBuilder, type ClientFooterBuilder, type ClientGeneratorsBuilder, type ClientHeaderBuilder, type ClientMockBuilder, type ClientMockGeneratorBuilder, type ClientMockGeneratorImplementation, type ClientTitleBuilder, type Config, type ConfigExternal, type ConfigFn, type ContextSpecs, EnumGeneration, type FetchOptions, FormDataArrayHandling, type FormDataType, type GenerateMockImports, type GeneratorApiBuilder, type GeneratorApiOperations, type GeneratorApiResponse, type GeneratorClient, type GeneratorClientExtra, type GeneratorClientFooter, type GeneratorClientHeader, type GeneratorClientImports, type GeneratorClientTitle, type GeneratorClients, type GeneratorDependency, type GeneratorImport, type GeneratorMutator, type GeneratorMutatorParsingInfo, type GeneratorOperation, type GeneratorOperations, type GeneratorOptions, type GeneratorSchema, type GeneratorTarget, type GeneratorTargetFull, type GeneratorVerbOptions, type GeneratorVerbsOptions, type GetterBody, type GetterParam, type GetterParameters, type GetterParams, type GetterProp, GetterPropType, type GetterProps, type GetterQueryParam, type GetterResponse, type GlobalMockOptions, type GlobalOptions, type HonoOptions, type Hook, type HookCommand, type HookFunction, type HookOption, type HooksOptions, type ImportOpenApi, type InputFiltersOption, type InputOptions, type InputTransformerFn, type LogLevel, LogLevels, type LogOptions, type LogType, type Logger, type LoggerOptions, type MockData, type MockDataArray, type MockDataArrayFn, type MockDataObject, type MockDataObjectFn, type MockOptions, type MockProperties, type MockPropertiesObject, type MockPropertiesObjectFn, type Mutator, type MutatorObject, NamingConvention, type NormalizedConfig, type NormalizedFormDataType, type NormalizedHonoOptions, type NormalizedHookCommand, type NormalizedHookOptions, type NormalizedInputOptions, type NormalizedMutator, type NormalizedOperationOptions, type NormalizedOptions, type NormalizedOutputOptions, type NormalizedOverrideOutput, type NormalizedParamsSerializerOptions, type NormalizedQueryOptions, type NormalizedZodOptions, type OperationOptions, type Options, type OptionsExport, type OptionsFn, OutputClient, type OutputClientFunc, type OutputDocsOptions, OutputHttpClient, OutputMockType, OutputMode, type OutputOptions, type OverrideInput, type OverrideMockOptions, type OverrideOutput, type OverrideOutputContentType, type PackageJson, type ParamsSerializerOptions, PropertySortOrder, type QueryOptions, RefComponentSuffix, type RefInfo, type ResReqTypesValue, type ResolverValue, type ScalarValue, SchemaType, type SchemaWithConst, type SwaggerParserOptions, type SwrOptions, TEMPLATE_TAG_REGEX, type TsConfigTarget, type Tsconfig, URL_REGEX, VERBS_WITH_BODY, Verbs, type WriteModeProps, type WriteSpecsBuilder, type ZodCoerceType, type ZodDateTimeOptions, type ZodOptions, _filteredVerbs, addDependency, asyncReduce, camel, combineSchemas, compareVersions, conventionName, count, createDebugger, createLogger, createSuccessMessage, dynamicImport, escape, generalJSTypes, generalJSTypesWithArray, generateAxiosOptions, generateBodyMutatorConfig, generateBodyOptions, generateComponentDefinition, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateImports, generateModelInline, generateModelsInline, generateMutator, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateParameterDefinition, generateQueryParamsAxiosConfig, generateSchemasDefinition, generateTarget, generateTargetForTags, generateVerbImports, generateVerbsOptions, getArray, getBody, getEnum, getEnumImplementation, getEnumNames, getExtension, getFileInfo, getFullRoute, getIsBodyVerb, getKey, getMockFileExtensionByTypeName, getNumberWord, getObject, getOperationId, getOrvalGeneratedTypes, getParameters, getParams, getParamsInPath, getProps, getQueryParams, getRefInfo, getResReqTypes, getResponse, getRoute, getRouteAsArray, getScalar, ibmOpenapiValidator, ibmOpenapiValidatorErrors, ibmOpenapiValidatorWarnings, isBoolean, isDirectory, isFunction, isModule, isNull, isNumber, isNumeric, isObject, isReference, isRootKey, isSchema, isString, isSyntheticDefaultImportsAllow, isUndefined, isUrl, isVerb, jsDoc, jsStringEscape, kebab, loadFile, log, logError, mergeDeep, mismatchArgsMessage, openApiConverter, pascal, removeFiles, resolveDiscriminators, resolveExampleRefs, resolveObject, resolveRef, resolveValue, sanitize, snake, sortByPriority, startMessage, stringify, toObjectString, path as upath, upper, writeModelInline, writeModelsInline, writeSchema, writeSchemas, writeSingleMode, writeSplitMode, writeSplitTagsMode, writeTagsMode };
|
|
1535
|
+
export { type AngularOptions, BODY_TYPE_NAME, type BaseUrlFromConstant, type BaseUrlFromSpec, type ClientBuilder, type ClientDependenciesBuilder, type ClientExtraFilesBuilder, type ClientFileBuilder, type ClientFooterBuilder, type ClientGeneratorsBuilder, type ClientHeaderBuilder, type ClientMockBuilder, type ClientMockGeneratorBuilder, type ClientMockGeneratorImplementation, type ClientTitleBuilder, type Config, type ConfigExternal, type ConfigFn, type ContextSpecs, EnumGeneration, type FetchOptions, FormDataArrayHandling, type FormDataType, type GenerateMockImports, type GeneratorApiBuilder, type GeneratorApiOperations, type GeneratorApiResponse, type GeneratorClient, type GeneratorClientExtra, type GeneratorClientFooter, type GeneratorClientHeader, type GeneratorClientImports, type GeneratorClientTitle, type GeneratorClients, type GeneratorDependency, type GeneratorImport, type GeneratorMutator, type GeneratorMutatorParsingInfo, type GeneratorOperation, type GeneratorOperations, type GeneratorOptions, type GeneratorSchema, type GeneratorTarget, type GeneratorTargetFull, type GeneratorVerbOptions, type GeneratorVerbsOptions, type GetterBody, type GetterParam, type GetterParameters, type GetterParams, type GetterProp, GetterPropType, type GetterProps, type GetterQueryParam, type GetterResponse, type GlobalMockOptions, type GlobalOptions, type HonoOptions, type Hook, type HookCommand, type HookFunction, type HookOption, type HooksOptions, type ImportOpenApi, type InputFiltersOption, type InputOptions, type InputTransformerFn, type JsDocOptions, type LogLevel, LogLevels, type LogOptions, type LogType, type Logger, type LoggerOptions, type MockData, type MockDataArray, type MockDataArrayFn, type MockDataObject, type MockDataObjectFn, type MockOptions, type MockProperties, type MockPropertiesObject, type MockPropertiesObjectFn, type Mutator, type MutatorObject, NamingConvention, type NormalizedConfig, type NormalizedFormDataType, type NormalizedHonoOptions, type NormalizedHookCommand, type NormalizedHookOptions, type NormalizedInputOptions, type NormalizedJsDocOptions, type NormalizedMutator, type NormalizedOperationOptions, type NormalizedOptions, type NormalizedOutputOptions, type NormalizedOverrideOutput, type NormalizedParamsSerializerOptions, type NormalizedQueryOptions, type NormalizedZodOptions, type OperationOptions, type Options, type OptionsExport, type OptionsFn, OutputClient, type OutputClientFunc, type OutputDocsOptions, OutputHttpClient, OutputMockType, OutputMode, type OutputOptions, type OverrideInput, type OverrideMockOptions, type OverrideOutput, type OverrideOutputContentType, type PackageJson, type ParamsSerializerOptions, PropertySortOrder, type QueryOptions, RefComponentSuffix, type RefInfo, type ResReqTypesValue, type ResolverValue, type ScalarValue, SchemaType, type SchemaWithConst, type SwaggerParserOptions, type SwrOptions, TEMPLATE_TAG_REGEX, type TsConfigTarget, type Tsconfig, URL_REGEX, VERBS_WITH_BODY, Verbs, type WriteModeProps, type WriteSpecsBuilder, type ZodCoerceType, type ZodDateTimeOptions, type ZodOptions, _filteredVerbs, addDependency, asyncReduce, camel, combineSchemas, compareVersions, conventionName, count, createDebugger, createLogger, createSuccessMessage, dynamicImport, escape, generalJSTypes, generalJSTypesWithArray, generateAxiosOptions, generateBodyMutatorConfig, generateBodyOptions, generateComponentDefinition, generateDependencyImports, generateFormDataAndUrlEncodedFunction, generateImports, generateModelInline, generateModelsInline, generateMutator, generateMutatorConfig, generateMutatorImports, generateMutatorRequestOptions, generateOptions, generateParameterDefinition, generateQueryParamsAxiosConfig, generateSchemasDefinition, generateTarget, generateTargetForTags, generateVerbImports, generateVerbsOptions, getArray, getBody, getEnum, getEnumDescriptions, getEnumImplementation, getEnumNames, getExtension, getFileInfo, getFullRoute, getIsBodyVerb, getKey, getMockFileExtensionByTypeName, getNumberWord, getObject, getOperationId, getOrvalGeneratedTypes, getParameters, getParams, getParamsInPath, getProps, getQueryParams, getRefInfo, getResReqTypes, getResponse, getRoute, getRouteAsArray, getScalar, ibmOpenapiValidator, ibmOpenapiValidatorErrors, ibmOpenapiValidatorWarnings, isBoolean, isDirectory, isFunction, isModule, isNull, isNumber, isNumeric, isObject, isReference, isRootKey, isSchema, isString, isSyntheticDefaultImportsAllow, isUndefined, isUrl, isVerb, jsDoc, jsStringEscape, kebab, keyValuePairsToJsDoc, loadFile, log, logError, mergeDeep, mismatchArgsMessage, openApiConverter, pascal, removeFiles, resolveDiscriminators, resolveExampleRefs, resolveObject, resolveRef, resolveValue, sanitize, snake, sortByPriority, startMessage, stringify, toObjectString, path as upath, upper, writeModelInline, writeModelsInline, writeSchema, writeSchemas, writeSingleMode, writeSplitMode, writeSplitTagsMode, writeTagsMode };
|