@orval/core 6.20.0 → 6.22.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 +76 -76
- package/dist/index.js +4316 -4578
- package/dist/index.js.map +1 -0
- package/package.json +15 -16
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import SwaggerParser from '@apidevtools/swagger-parser';
|
|
|
2
2
|
import * as openapi3_ts from 'openapi3-ts';
|
|
3
3
|
import { InfoObject, OperationObject, OpenAPIObject, ResponsesObject, ReferenceObject, RequestBodyObject, ParameterObject, SchemaObject, ComponentsObject, SchemasObject, PathItemObject, ResponseObject, ExampleObject } from 'openapi3-ts';
|
|
4
4
|
import swagger2openapi from 'swagger2openapi';
|
|
5
|
+
import { allLocales } from '@faker-js/faker';
|
|
5
6
|
import { CompareOperator } from 'compare-versions';
|
|
6
7
|
import debug from 'debug';
|
|
7
8
|
|
|
@@ -30,7 +31,7 @@ type NormalizedOutputOptions = {
|
|
|
30
31
|
target?: string;
|
|
31
32
|
schemas?: string;
|
|
32
33
|
mode: OutputMode;
|
|
33
|
-
mock
|
|
34
|
+
mock?: GlobalMockOptions | ClientMockBuilder;
|
|
34
35
|
override: NormalizedOverrideOutput;
|
|
35
36
|
client: OutputClient | OutputClientFunc;
|
|
36
37
|
clean: boolean | string[];
|
|
@@ -41,6 +42,8 @@ type NormalizedOutputOptions = {
|
|
|
41
42
|
headers: boolean;
|
|
42
43
|
indexFiles: boolean;
|
|
43
44
|
baseUrl?: string;
|
|
45
|
+
allParamsOptional: boolean;
|
|
46
|
+
urlEncodeParameters: boolean;
|
|
44
47
|
};
|
|
45
48
|
type NormalizedParamsSerializerOptions = {
|
|
46
49
|
qs?: Record<string, any>;
|
|
@@ -55,18 +58,7 @@ type NormalizedOverrideOutput = {
|
|
|
55
58
|
tags: {
|
|
56
59
|
[key: string]: NormalizedOperationOptions;
|
|
57
60
|
};
|
|
58
|
-
mock?:
|
|
59
|
-
arrayMin?: number;
|
|
60
|
-
arrayMax?: number;
|
|
61
|
-
properties?: MockProperties;
|
|
62
|
-
format?: {
|
|
63
|
-
[key: string]: unknown;
|
|
64
|
-
};
|
|
65
|
-
required?: boolean;
|
|
66
|
-
baseUrl?: string;
|
|
67
|
-
delay?: number | (() => number);
|
|
68
|
-
useExamples?: boolean;
|
|
69
|
-
};
|
|
61
|
+
mock?: OverrideMockOptions;
|
|
70
62
|
contentType?: OverrideOutputContentType;
|
|
71
63
|
header: false | ((info: InfoObject) => string[] | string);
|
|
72
64
|
formData: boolean | NormalizedMutator;
|
|
@@ -95,10 +87,12 @@ type NormalizedOverrideOutput = {
|
|
|
95
87
|
operationName?: (operation: OperationObject, route: string, verb: Verbs) => string;
|
|
96
88
|
requestOptions: Record<string, any> | boolean;
|
|
97
89
|
useDates?: boolean;
|
|
90
|
+
coerceTypes?: boolean;
|
|
98
91
|
useTypeOverInterfaces?: boolean;
|
|
99
92
|
useDeprecatedOperations?: boolean;
|
|
100
93
|
useBigInt?: boolean;
|
|
101
94
|
useNamedParameters?: boolean;
|
|
95
|
+
useNativeEnums?: boolean;
|
|
102
96
|
};
|
|
103
97
|
type NormalizedMutator = {
|
|
104
98
|
path: string;
|
|
@@ -141,7 +135,7 @@ type OutputOptions = {
|
|
|
141
135
|
target?: string;
|
|
142
136
|
schemas?: string;
|
|
143
137
|
mode?: OutputMode;
|
|
144
|
-
mock?: boolean |
|
|
138
|
+
mock?: boolean | GlobalMockOptions | ClientMockBuilder;
|
|
145
139
|
override?: OverrideOutput;
|
|
146
140
|
client?: OutputClient | OutputClientFunc;
|
|
147
141
|
clean?: boolean | string[];
|
|
@@ -152,6 +146,8 @@ type OutputOptions = {
|
|
|
152
146
|
headers?: boolean;
|
|
153
147
|
indexFiles?: boolean;
|
|
154
148
|
baseUrl?: string;
|
|
149
|
+
allParamsOptional?: boolean;
|
|
150
|
+
urlEncodeParameters?: boolean;
|
|
155
151
|
};
|
|
156
152
|
type SwaggerParserOptions = Omit<SwaggerParser.Options, 'validate'> & {
|
|
157
153
|
validate?: boolean;
|
|
@@ -166,33 +162,49 @@ type InputOptions = {
|
|
|
166
162
|
tags?: string[];
|
|
167
163
|
};
|
|
168
164
|
};
|
|
169
|
-
type OutputClient = 'axios' | 'axios-functions' | 'angular' | 'react-query' | 'svelte-query' | 'vue-query' | 'swr' | 'zod';
|
|
170
165
|
declare const OutputClient: {
|
|
171
|
-
ANGULAR:
|
|
172
|
-
AXIOS:
|
|
173
|
-
AXIOS_FUNCTIONS:
|
|
174
|
-
REACT_QUERY:
|
|
175
|
-
SVELTE_QUERY:
|
|
176
|
-
VUE_QUERY:
|
|
166
|
+
readonly ANGULAR: "angular";
|
|
167
|
+
readonly AXIOS: "axios";
|
|
168
|
+
readonly AXIOS_FUNCTIONS: "axios-functions";
|
|
169
|
+
readonly REACT_QUERY: "react-query";
|
|
170
|
+
readonly SVELTE_QUERY: "svelte-query";
|
|
171
|
+
readonly VUE_QUERY: "vue-query";
|
|
172
|
+
readonly SWR: "swr";
|
|
173
|
+
readonly ZOD: "zod";
|
|
177
174
|
};
|
|
178
|
-
type
|
|
175
|
+
type OutputClient = typeof OutputClient[keyof typeof OutputClient];
|
|
179
176
|
declare const OutputMode: {
|
|
180
|
-
SINGLE:
|
|
181
|
-
SPLIT:
|
|
182
|
-
TAGS:
|
|
183
|
-
TAGS_SPLIT:
|
|
177
|
+
readonly SINGLE: "single";
|
|
178
|
+
readonly SPLIT: "split";
|
|
179
|
+
readonly TAGS: "tags";
|
|
180
|
+
readonly TAGS_SPLIT: "tags-split";
|
|
181
|
+
};
|
|
182
|
+
type OutputMode = typeof OutputMode[keyof typeof OutputMode];
|
|
183
|
+
declare const OutputMockType: {
|
|
184
|
+
readonly MSW: "msw";
|
|
184
185
|
};
|
|
185
|
-
type
|
|
186
|
+
type OutputMockType = typeof OutputMockType[keyof typeof OutputMockType];
|
|
187
|
+
type GlobalMockOptions = {
|
|
188
|
+
type: OutputMockType;
|
|
189
|
+
useExamples?: boolean;
|
|
190
|
+
delay?: number | (() => number);
|
|
191
|
+
baseUrl?: string;
|
|
192
|
+
locale?: keyof typeof allLocales;
|
|
193
|
+
};
|
|
194
|
+
type OverrideMockOptions = Partial<GlobalMockOptions> & {
|
|
186
195
|
arrayMin?: number;
|
|
187
196
|
arrayMax?: number;
|
|
188
197
|
required?: boolean;
|
|
189
|
-
properties?:
|
|
198
|
+
properties?: MockProperties;
|
|
199
|
+
format?: Record<string, unknown>;
|
|
200
|
+
};
|
|
201
|
+
type MockOptions = Omit<OverrideMockOptions, 'properties'> & {
|
|
202
|
+
properties?: Record<string, unknown>;
|
|
190
203
|
operations?: Record<string, {
|
|
191
|
-
properties: Record<string,
|
|
204
|
+
properties: Record<string, unknown>;
|
|
192
205
|
}>;
|
|
193
|
-
format?: Record<string, string>;
|
|
194
206
|
tags?: Record<string, {
|
|
195
|
-
properties: Record<string,
|
|
207
|
+
properties: Record<string, unknown>;
|
|
196
208
|
}>;
|
|
197
209
|
};
|
|
198
210
|
type MockProperties = {
|
|
@@ -222,18 +234,7 @@ type OverrideOutput = {
|
|
|
222
234
|
tags?: {
|
|
223
235
|
[key: string]: OperationOptions;
|
|
224
236
|
};
|
|
225
|
-
mock?:
|
|
226
|
-
arrayMin?: number;
|
|
227
|
-
arrayMax?: number;
|
|
228
|
-
properties?: MockProperties;
|
|
229
|
-
format?: {
|
|
230
|
-
[key: string]: unknown;
|
|
231
|
-
};
|
|
232
|
-
required?: boolean;
|
|
233
|
-
baseUrl?: string;
|
|
234
|
-
delay?: number;
|
|
235
|
-
useExamples?: boolean;
|
|
236
|
-
};
|
|
237
|
+
mock?: OverrideMockOptions;
|
|
237
238
|
contentType?: OverrideOutputContentType;
|
|
238
239
|
header?: boolean | ((info: InfoObject) => string[] | string);
|
|
239
240
|
formData?: boolean | Mutator;
|
|
@@ -266,6 +267,7 @@ type OverrideOutput = {
|
|
|
266
267
|
useDeprecatedOperations?: boolean;
|
|
267
268
|
useBigInt?: boolean;
|
|
268
269
|
useNamedParameters?: boolean;
|
|
270
|
+
useNativeEnums?: boolean;
|
|
269
271
|
};
|
|
270
272
|
type OverrideOutputContentType = {
|
|
271
273
|
include?: string[];
|
|
@@ -366,7 +368,7 @@ interface GlobalOptions {
|
|
|
366
368
|
clean?: boolean | string[];
|
|
367
369
|
prettier?: boolean;
|
|
368
370
|
tslint?: boolean;
|
|
369
|
-
mock?: boolean;
|
|
371
|
+
mock?: boolean | GlobalMockOptions;
|
|
370
372
|
client?: OutputClient;
|
|
371
373
|
mode?: OutputMode;
|
|
372
374
|
tsconfig?: string | Tsconfig;
|
|
@@ -417,8 +419,8 @@ type GeneratorOperations = {
|
|
|
417
419
|
type GeneratorTarget = {
|
|
418
420
|
imports: GeneratorImport[];
|
|
419
421
|
implementation: string;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
+
implementationMock: string;
|
|
423
|
+
importsMock: GeneratorImport[];
|
|
422
424
|
mutators?: GeneratorMutator[];
|
|
423
425
|
clientMutators?: GeneratorMutator[];
|
|
424
426
|
formData?: GeneratorMutator[];
|
|
@@ -428,11 +430,11 @@ type GeneratorTarget = {
|
|
|
428
430
|
type GeneratorTargetFull = {
|
|
429
431
|
imports: GeneratorImport[];
|
|
430
432
|
implementation: string;
|
|
431
|
-
|
|
433
|
+
implementationMock: {
|
|
432
434
|
function: string;
|
|
433
435
|
handler: string;
|
|
434
436
|
};
|
|
435
|
-
|
|
437
|
+
importsMock: GeneratorImport[];
|
|
436
438
|
mutators?: GeneratorMutator[];
|
|
437
439
|
clientMutators?: GeneratorMutator[];
|
|
438
440
|
formData?: GeneratorMutator[];
|
|
@@ -442,11 +444,11 @@ type GeneratorTargetFull = {
|
|
|
442
444
|
type GeneratorOperation = {
|
|
443
445
|
imports: GeneratorImport[];
|
|
444
446
|
implementation: string;
|
|
445
|
-
|
|
447
|
+
implementationMock: {
|
|
446
448
|
function: string;
|
|
447
449
|
handler: string;
|
|
448
450
|
};
|
|
449
|
-
|
|
451
|
+
importsMock: GeneratorImport[];
|
|
450
452
|
tags: string[];
|
|
451
453
|
mutator?: GeneratorMutator;
|
|
452
454
|
clientMutators?: GeneratorMutator[];
|
|
@@ -485,7 +487,7 @@ type GeneratorOptions = {
|
|
|
485
487
|
pathRoute: string;
|
|
486
488
|
override: NormalizedOverrideOutput;
|
|
487
489
|
context: ContextSpecs;
|
|
488
|
-
mock
|
|
490
|
+
mock?: GlobalMockOptions | ClientMockBuilder;
|
|
489
491
|
output: string;
|
|
490
492
|
};
|
|
491
493
|
type GeneratorClient = {
|
|
@@ -508,7 +510,7 @@ type GeneratorMutator = {
|
|
|
508
510
|
isHook: boolean;
|
|
509
511
|
bodyTypeName?: string;
|
|
510
512
|
};
|
|
511
|
-
type ClientBuilder = (verbOptions: GeneratorVerbOptions, options: GeneratorOptions, outputClient: OutputClient | OutputClientFunc) => GeneratorClient | Promise<GeneratorClient>;
|
|
513
|
+
type ClientBuilder = (verbOptions: GeneratorVerbOptions, options: GeneratorOptions, outputClient: OutputClient | OutputClientFunc, output?: NormalizedOutputOptions) => GeneratorClient | Promise<GeneratorClient>;
|
|
512
514
|
type ClientHeaderBuilder = (params: {
|
|
513
515
|
title: string;
|
|
514
516
|
isRequestOptions: boolean;
|
|
@@ -527,7 +529,7 @@ type ClientFooterBuilder = (params: {
|
|
|
527
529
|
}) => string;
|
|
528
530
|
type ClientTitleBuilder = (title: string) => string;
|
|
529
531
|
type ClientDependenciesBuilder = (hasGlobalMutator: boolean, hasParamsSerializerOptions: boolean, packageJson?: PackageJson) => GeneratorDependency[];
|
|
530
|
-
type
|
|
532
|
+
type ClientMockBuilder = (verbOptions: GeneratorVerbOptions, generatorOptions: GeneratorOptions) => {
|
|
531
533
|
imports: string[];
|
|
532
534
|
implementation: string;
|
|
533
535
|
};
|
|
@@ -676,12 +678,13 @@ type GeneratorApiOperations = {
|
|
|
676
678
|
};
|
|
677
679
|
type GeneratorClientExtra = {
|
|
678
680
|
implementation: string;
|
|
679
|
-
|
|
681
|
+
implementationMock: string;
|
|
680
682
|
};
|
|
681
683
|
type GeneratorClientTitle = (data: {
|
|
682
684
|
outputClient?: OutputClient | OutputClientFunc;
|
|
683
685
|
title: string;
|
|
684
686
|
customTitleFunc?: (title: string) => string;
|
|
687
|
+
output: NormalizedOutputOptions;
|
|
685
688
|
}) => GeneratorClientExtra;
|
|
686
689
|
type GeneratorClientHeader = (data: {
|
|
687
690
|
outputClient?: OutputClient | OutputClientFunc;
|
|
@@ -691,6 +694,7 @@ type GeneratorClientHeader = (data: {
|
|
|
691
694
|
provideIn: boolean | 'root' | 'any';
|
|
692
695
|
hasAwaitedType: boolean;
|
|
693
696
|
titles: GeneratorClientExtra;
|
|
697
|
+
output: NormalizedOutputOptions;
|
|
694
698
|
}) => GeneratorClientExtra;
|
|
695
699
|
type GeneratorClientFooter = (data: {
|
|
696
700
|
outputClient: OutputClient | OutputClientFunc;
|
|
@@ -698,6 +702,7 @@ type GeneratorClientFooter = (data: {
|
|
|
698
702
|
hasMutator: boolean;
|
|
699
703
|
hasAwaitedType: boolean;
|
|
700
704
|
titles: GeneratorClientExtra;
|
|
705
|
+
output: NormalizedOutputOptions;
|
|
701
706
|
}) => GeneratorClientExtra;
|
|
702
707
|
type GeneratorClientImports = (data: {
|
|
703
708
|
client: OutputClient | OutputClientFunc;
|
|
@@ -712,6 +717,7 @@ type GeneratorClientImports = (data: {
|
|
|
712
717
|
hasGlobalMutator: boolean;
|
|
713
718
|
hasParamsSerializerOptions: boolean;
|
|
714
719
|
packageJson?: PackageJson;
|
|
720
|
+
output: NormalizedOutputOptions;
|
|
715
721
|
}) => string;
|
|
716
722
|
type GenerateMockImports = (data: {
|
|
717
723
|
implementation: string;
|
|
@@ -722,6 +728,7 @@ type GenerateMockImports = (data: {
|
|
|
722
728
|
specsName: Record<string, string>;
|
|
723
729
|
hasSchemaDir: boolean;
|
|
724
730
|
isAllowSyntheticDefaultImports: boolean;
|
|
731
|
+
options?: GlobalMockOptions;
|
|
725
732
|
}) => string;
|
|
726
733
|
type GeneratorApiBuilder = GeneratorApiOperations & {
|
|
727
734
|
title: GeneratorClientTitle;
|
|
@@ -777,17 +784,18 @@ declare const generateMutator: ({ output, mutator, name, workspace, tsconfig, }:
|
|
|
777
784
|
}) => Promise<GeneratorMutator | undefined>;
|
|
778
785
|
|
|
779
786
|
declare const generateBodyOptions: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
780
|
-
declare const generateAxiosOptions: ({ response, isExactOptionalPropertyTypes, queryParams, headers, requestOptions, hasSignal, paramsSerializer, paramsSerializerOptions, }: {
|
|
787
|
+
declare const generateAxiosOptions: ({ response, isExactOptionalPropertyTypes, queryParams, headers, requestOptions, hasSignal, isVue, paramsSerializer, paramsSerializerOptions, }: {
|
|
781
788
|
response: GetterResponse;
|
|
782
789
|
isExactOptionalPropertyTypes: boolean;
|
|
783
790
|
queryParams?: GeneratorSchema | undefined;
|
|
784
791
|
headers?: GeneratorSchema | undefined;
|
|
785
792
|
requestOptions?: boolean | object | undefined;
|
|
786
793
|
hasSignal: boolean;
|
|
794
|
+
isVue: boolean;
|
|
787
795
|
paramsSerializer?: GeneratorMutator | undefined;
|
|
788
796
|
paramsSerializerOptions?: ParamsSerializerOptions | undefined;
|
|
789
797
|
}) => string;
|
|
790
|
-
declare const generateOptions: ({ route, body, headers, queryParams, response, verb, requestOptions, isFormData, isFormUrlEncoded, isAngular, isExactOptionalPropertyTypes, hasSignal, paramsSerializer, paramsSerializerOptions, }: {
|
|
798
|
+
declare const generateOptions: ({ route, body, headers, queryParams, response, verb, requestOptions, isFormData, isFormUrlEncoded, isAngular, isExactOptionalPropertyTypes, hasSignal, isVue, paramsSerializer, paramsSerializerOptions, }: {
|
|
791
799
|
route: string;
|
|
792
800
|
body: GetterBody;
|
|
793
801
|
headers?: GetterQueryParam | undefined;
|
|
@@ -800,12 +808,13 @@ declare const generateOptions: ({ route, body, headers, queryParams, response, v
|
|
|
800
808
|
isAngular?: boolean | undefined;
|
|
801
809
|
isExactOptionalPropertyTypes: boolean;
|
|
802
810
|
hasSignal: boolean;
|
|
811
|
+
isVue?: boolean | undefined;
|
|
803
812
|
paramsSerializer?: GeneratorMutator | undefined;
|
|
804
813
|
paramsSerializerOptions?: ParamsSerializerOptions | undefined;
|
|
805
814
|
}) => string;
|
|
806
815
|
declare const generateBodyMutatorConfig: (body: GetterBody, isFormData: boolean, isFormUrlEncoded: boolean) => string;
|
|
807
|
-
declare const generateQueryParamsAxiosConfig: (response: GetterResponse, queryParams?: GetterQueryParam) => string;
|
|
808
|
-
declare const generateMutatorConfig: ({ route, body, headers, queryParams, response, verb, isFormData, isFormUrlEncoded, isBodyVerb, hasSignal, isExactOptionalPropertyTypes, }: {
|
|
816
|
+
declare const generateQueryParamsAxiosConfig: (response: GetterResponse, isVue: boolean, queryParams?: GetterQueryParam) => string;
|
|
817
|
+
declare const generateMutatorConfig: ({ route, body, headers, queryParams, response, verb, isFormData, isFormUrlEncoded, isBodyVerb, hasSignal, isExactOptionalPropertyTypes, isVue, }: {
|
|
809
818
|
route: string;
|
|
810
819
|
body: GetterBody;
|
|
811
820
|
headers?: GetterQueryParam | undefined;
|
|
@@ -817,6 +826,7 @@ declare const generateMutatorConfig: ({ route, body, headers, queryParams, respo
|
|
|
817
826
|
isBodyVerb: boolean;
|
|
818
827
|
hasSignal: boolean;
|
|
819
828
|
isExactOptionalPropertyTypes: boolean;
|
|
829
|
+
isVue?: boolean | undefined;
|
|
820
830
|
}) => string;
|
|
821
831
|
declare const generateMutatorRequestOptions: (requestOptions: boolean | object | undefined, hasSecondArgument: boolean) => string;
|
|
822
832
|
declare const generateFormDataAndUrlEncodedFunction: ({ body, formData, formUrlEncoded, isFormData, isFormUrlEncoded, }: {
|
|
@@ -874,7 +884,7 @@ declare const combineSchemas: ({ name, schema, separator, context, nullable, }:
|
|
|
874
884
|
|
|
875
885
|
declare const resolveDiscriminators: (schemas: SchemasObject, context: ContextSpecs) => SchemasObject;
|
|
876
886
|
|
|
877
|
-
declare const getEnum: (value: string, enumName: string, names?: string[]) => string;
|
|
887
|
+
declare const getEnum: (value: string, enumName: string, names?: string[], useNativeEnums?: boolean) => string;
|
|
878
888
|
declare const getEnumImplementation: (value: string, names?: string[]) => string;
|
|
879
889
|
|
|
880
890
|
declare const getKey: (key: string) => string;
|
|
@@ -909,7 +919,7 @@ declare const getParameters: ({ parameters, context, }: {
|
|
|
909
919
|
* @param path
|
|
910
920
|
*/
|
|
911
921
|
declare const getParamsInPath: (path: string) => string[];
|
|
912
|
-
declare const getParams: ({ route, pathParams, operationId, context, }: {
|
|
922
|
+
declare const getParams: ({ route, pathParams, operationId, context, output, }: {
|
|
913
923
|
route: string;
|
|
914
924
|
pathParams?: {
|
|
915
925
|
parameter: openapi3_ts.ParameterObject;
|
|
@@ -917,6 +927,7 @@ declare const getParams: ({ route, pathParams, operationId, context, }: {
|
|
|
917
927
|
}[] | undefined;
|
|
918
928
|
operationId: string;
|
|
919
929
|
context: ContextSpecs;
|
|
930
|
+
output: NormalizedOutputOptions;
|
|
920
931
|
}) => GetterParams;
|
|
921
932
|
|
|
922
933
|
declare const getProps: ({ body, queryParams, params, operationName, headers, context, }: {
|
|
@@ -1119,6 +1130,8 @@ declare function loadFile<File = any>(filePath?: string, options?: {
|
|
|
1119
1130
|
}>;
|
|
1120
1131
|
declare function removeFiles(patterns: string[], dir: string): Promise<void>;
|
|
1121
1132
|
|
|
1133
|
+
declare const getMockFileExtensionByTypeName: (mock: GlobalMockOptions | ClientMockBuilder) => string;
|
|
1134
|
+
|
|
1122
1135
|
declare function mergeDeep<T extends Record<string, any>>(source: T, target: T): T;
|
|
1123
1136
|
|
|
1124
1137
|
declare const count: (str: string | undefined, key: string) => number;
|
|
@@ -1155,20 +1168,7 @@ declare const path_relativeSafe: typeof relativeSafe;
|
|
|
1155
1168
|
declare const path_resolve: typeof resolve;
|
|
1156
1169
|
declare const path_separator: typeof separator;
|
|
1157
1170
|
declare namespace path {
|
|
1158
|
-
export {
|
|
1159
|
-
path_basename as basename,
|
|
1160
|
-
path_dirname as dirname,
|
|
1161
|
-
path_extname as extname,
|
|
1162
|
-
path_getSchemaFileName as getSchemaFileName,
|
|
1163
|
-
path_getSpecName as getSpecName,
|
|
1164
|
-
path_isAbsolute as isAbsolute,
|
|
1165
|
-
path_join as join,
|
|
1166
|
-
path_joinSafe as joinSafe,
|
|
1167
|
-
path_normalizeSafe as normalizeSafe,
|
|
1168
|
-
path_relativeSafe as relativeSafe,
|
|
1169
|
-
path_resolve as resolve,
|
|
1170
|
-
path_separator as separator,
|
|
1171
|
-
};
|
|
1171
|
+
export { path_basename as basename, path_dirname as dirname, path_extname as extname, path_getSchemaFileName as getSchemaFileName, path_getSpecName as getSpecName, path_isAbsolute as isAbsolute, path_join as join, path_joinSafe as joinSafe, path_normalizeSafe as normalizeSafe, path_relativeSafe as relativeSafe, path_resolve as resolve, path_separator as separator };
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
1174
|
declare const sortByPriority: <T>(arr: (T & {
|
|
@@ -1193,7 +1193,7 @@ declare const sanitize: (value: string, options?: {
|
|
|
1193
1193
|
}) => string;
|
|
1194
1194
|
declare const toObjectString: <T>(props: T[], path?: keyof T | undefined) => string;
|
|
1195
1195
|
declare const getNumberWord: (num: number) => string;
|
|
1196
|
-
declare const escape: (str: string, char?: string) => string;
|
|
1196
|
+
declare const escape: (str: string | null, char?: string) => string | undefined;
|
|
1197
1197
|
/**
|
|
1198
1198
|
* Escape all characters not included in SingleStringCharacters and
|
|
1199
1199
|
* DoubleStringCharacters on
|
|
@@ -1250,4 +1250,4 @@ declare const generateTarget: (builder: WriteSpecsBuilder, options: NormalizedOu
|
|
|
1250
1250
|
|
|
1251
1251
|
declare const generateTargetForTags: (builder: WriteSpecsBuilder, options: NormalizedOutputOptions) => Record<string, GeneratorTarget>;
|
|
1252
1252
|
|
|
1253
|
-
export { AngularOptions, BODY_TYPE_NAME, ClientBuilder, ClientDependenciesBuilder, ClientFooterBuilder, ClientGeneratorsBuilder, ClientHeaderBuilder,
|
|
1253
|
+
export { type AngularOptions, BODY_TYPE_NAME, type ClientBuilder, type ClientDependenciesBuilder, type ClientFooterBuilder, type ClientGeneratorsBuilder, type ClientHeaderBuilder, type ClientMockBuilder, type ClientTitleBuilder, type Config, type ConfigExternal, type ConfigFn, type ContextSpecs, 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 Hook, type HookCommand, type HookFunction, type HooksOptions, type ImportOpenApi, type InputOptions, type InputTransformerFn, type LogLevel, LogLevels, type LogOptions, type LogType, type Logger, type LoggerOptions, type MockOptions, type MockProperties, type Mutator, type MutatorObject, type NormalizedConfig, type NormalizedHookCommand, type NormalizedHookOptions, type NormalizedInputOptions, type NormalizedMutator, type NormalizedOperationOptions, type NormalizedOptions, type NormalizedOutputOptions, type NormalizedOverrideOutput, type NormalizedParamsSerializerOptions, type NormalizedQueryOptions, type OperationOptions, type Options, type OptionsExport, type OptionsFn, OutputClient, type OutputClientFunc, OutputMockType, OutputMode, type OutputOptions, type OverrideInput, type OverrideMockOptions, type OverrideOutput, type OverrideOutputContentType, type PackageJson, type ParamsSerializerOptions, type QueryOptions, RefComponentSuffix, type RefInfo, type ResReqTypesValue, type ResolverValue, type ScalarValue, SchemaType, type SwaggerParserOptions, type TsConfigTarget, type Tsconfig, URL_REGEX, VERBS_WITH_BODY, Verbs, type WriteModeProps, type WriteSpecsBuilder, _filteredVerbs, addDependency, asyncReduce, camel, combineSchemas, compareVersions, count, createDebugger, createLogger, createSuccessMessage, dynamicImport, errorMessage, 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, getExtension, getFileInfo, 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, 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 };
|