@goast/typescript 0.3.7-beta1 → 0.3.8-beta1
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/assets/client/angular/request-builder.ts +1 -1
- package/cjs/lib/ast/references/typescript.js +2 -1
- package/cjs/lib/generators/models/model-generator.js +34 -7
- package/cjs/lib/generators/models/models-generator.js +3 -1
- package/cjs/lib/generators/services/easy-network-stub/easy-network-stubs-generator.js +4 -8
- package/esm/lib/ast/references/typescript.js +1 -0
- package/esm/lib/generators/models/model-generator.js +34 -7
- package/esm/lib/generators/models/models-generator.js +3 -1
- package/esm/lib/generators/services/easy-network-stub/easy-network-stubs-generator.js +4 -8
- package/package.json +1 -1
- package/types/lib/ast/references/typescript.d.ts +6 -0
- package/types/lib/common-results.d.ts +2 -1
- package/types/lib/generators/models/model-generator.d.ts +4 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.instanceType = exports.returnType = exports.parameters = exports.nonNullable = exports.extract = exports.exclude = exports.omit = exports.pick = exports.required = exports.partial = exports.readonly = exports.readonlyArray = exports.promise = exports.set = exports.map = exports.record = exports.array = exports.null_ = exports.undefined_ = exports.object = exports.symbol = exports.bigint = exports.boolean = exports.string = exports.number = exports.never = exports.void_ = exports.unknown = exports.any = void 0;
|
|
3
|
+
exports.blob = exports.instanceType = exports.returnType = exports.parameters = exports.nonNullable = exports.extract = exports.exclude = exports.omit = exports.pick = exports.required = exports.partial = exports.readonly = exports.readonlyArray = exports.promise = exports.set = exports.map = exports.record = exports.array = exports.null_ = exports.undefined_ = exports.object = exports.symbol = exports.bigint = exports.boolean = exports.string = exports.number = exports.never = exports.void_ = exports.unknown = exports.any = void 0;
|
|
4
4
|
const reference_1 = require("../nodes/reference");
|
|
5
5
|
exports.any = reference_1.tsReference.factory('any');
|
|
6
6
|
exports.unknown = reference_1.tsReference.factory('unknown');
|
|
@@ -31,3 +31,4 @@ exports.nonNullable = reference_1.tsReference.genericFactory('NonNullable');
|
|
|
31
31
|
exports.parameters = reference_1.tsReference.genericFactory('Parameters');
|
|
32
32
|
exports.returnType = reference_1.tsReference.genericFactory('ReturnType');
|
|
33
33
|
exports.instanceType = reference_1.tsReference.genericFactory('InstanceType');
|
|
34
|
+
exports.blob = reference_1.tsReference.factory('Blob');
|
|
@@ -19,15 +19,25 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
|
|
|
19
19
|
generator: (b) => b.append(fileContent),
|
|
20
20
|
});
|
|
21
21
|
const exports = fileContent.values.filter((x) => typeof x === 'object' && x !== null && 'export' in x && x.export === true && 'name' in x);
|
|
22
|
-
const
|
|
22
|
+
const node = exports.find((x) => x.name === name);
|
|
23
23
|
return {
|
|
24
24
|
component: name,
|
|
25
25
|
filePath,
|
|
26
|
-
imports: [
|
|
26
|
+
imports: [
|
|
27
|
+
{
|
|
28
|
+
kind: 'file',
|
|
29
|
+
name,
|
|
30
|
+
modulePath: filePath,
|
|
31
|
+
type: node instanceof ast_1.ts.Interface || node instanceof ast_1.ts.TypeAlias ? 'type-import' : 'import',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
27
34
|
additionalExports: exports
|
|
28
35
|
.filter((x) => x.name !== name)
|
|
29
|
-
.map((x) => ({
|
|
30
|
-
|
|
36
|
+
.map((x) => ({
|
|
37
|
+
name: x.name,
|
|
38
|
+
type: x instanceof ast_1.ts.TypeAlias || x instanceof ast_1.ts.Interface ? 'type-export' : 'export',
|
|
39
|
+
})),
|
|
40
|
+
kind: this.getNodeKind(node),
|
|
31
41
|
};
|
|
32
42
|
}
|
|
33
43
|
else {
|
|
@@ -35,9 +45,20 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
|
|
|
35
45
|
builder.append(this.getType(ctx, ctx.schema));
|
|
36
46
|
const imports = builder.imports.imports;
|
|
37
47
|
builder.imports.clear();
|
|
38
|
-
return { component: builder.toString(false), imports
|
|
48
|
+
return { component: builder.toString(false), imports };
|
|
39
49
|
}
|
|
40
50
|
}
|
|
51
|
+
getNodeKind(node) {
|
|
52
|
+
if (node instanceof ast_1.ts.Interface)
|
|
53
|
+
return 'interface';
|
|
54
|
+
if (node instanceof ast_1.ts.TypeAlias)
|
|
55
|
+
return 'type';
|
|
56
|
+
if (node instanceof ast_1.ts.Enum)
|
|
57
|
+
return 'enum';
|
|
58
|
+
if (node instanceof ast_1.ts.Class)
|
|
59
|
+
return 'class';
|
|
60
|
+
return undefined;
|
|
61
|
+
}
|
|
41
62
|
getFileContent(ctx) {
|
|
42
63
|
var _a;
|
|
43
64
|
const content = (0, core_1.appendValueGroup)([], '\n');
|
|
@@ -182,7 +203,7 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
|
|
|
182
203
|
case 'number':
|
|
183
204
|
return 'number';
|
|
184
205
|
case 'string':
|
|
185
|
-
return
|
|
206
|
+
return this.getStringType(ctx, schema);
|
|
186
207
|
case 'null':
|
|
187
208
|
return 'null';
|
|
188
209
|
case 'unknown':
|
|
@@ -201,6 +222,12 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
|
|
|
201
222
|
return this.getAnyType(ctx);
|
|
202
223
|
}
|
|
203
224
|
}
|
|
225
|
+
getStringType(ctx, schema) {
|
|
226
|
+
if (schema.format === 'binary') {
|
|
227
|
+
return ast_1.ts.refs.blob();
|
|
228
|
+
}
|
|
229
|
+
return 'string';
|
|
230
|
+
}
|
|
204
231
|
getArrayType(ctx, schema) {
|
|
205
232
|
var _a;
|
|
206
233
|
return ast_1.ts.arrayType((_a = this.getType(ctx, schema.items)) !== null && _a !== void 0 ? _a : this.getAnyType(ctx), {
|
|
@@ -269,7 +296,7 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
|
|
|
269
296
|
return ast_1.ts.unionType(schema.type.map((x) => {
|
|
270
297
|
switch (x) {
|
|
271
298
|
case 'string':
|
|
272
|
-
return
|
|
299
|
+
return this.getStringType(ctx, schema);
|
|
273
300
|
case 'number':
|
|
274
301
|
case 'integer':
|
|
275
302
|
return 'number';
|
|
@@ -58,7 +58,9 @@ class TypeScriptModelsGenerator extends core_1.OpenApiSchemasGenerationProviderB
|
|
|
58
58
|
if (!filePath)
|
|
59
59
|
return [];
|
|
60
60
|
return [
|
|
61
|
-
ast_1.ts.export(x.component, filePath, {
|
|
61
|
+
ast_1.ts.export(x.component, filePath, {
|
|
62
|
+
kind: x.kind === 'type' || x.kind === 'interface' ? 'type-export' : 'export',
|
|
63
|
+
}),
|
|
62
64
|
...((_b = (_a = x.additionalExports) === null || _a === void 0 ? void 0 : _a.map((e) => typeof e === 'string' ? ast_1.ts.export(e, filePath) : ast_1.ts.export(e.name, filePath, { kind: e.type }))) !== null && _b !== void 0 ? _b : []),
|
|
63
65
|
];
|
|
64
66
|
}));
|
|
@@ -82,15 +82,13 @@ class TypeScriptEasyNetworkStubsGenerator extends core_1.OpenApiServicesGenerati
|
|
|
82
82
|
...Object.entries(ctx.output.typescript.stubs).map(([id, x]) => ast_1.ts.property((0, core_1.toCasing)(serviceNames[id], fieldCasing), {
|
|
83
83
|
accessModifier: 'private',
|
|
84
84
|
optional: true,
|
|
85
|
-
type: ctx.refs.easyNetworkStubGroup([ast_1.ts.reference(x.component, x.filePath), 'this'],
|
|
86
|
-
importType: 'type-import',
|
|
87
|
-
}),
|
|
85
|
+
type: ctx.refs.easyNetworkStubGroup([ast_1.ts.reference(x.component, x.filePath), 'this']),
|
|
88
86
|
})),
|
|
89
87
|
ast_1.ts.constructor({
|
|
90
88
|
parameters: [
|
|
91
89
|
ast_1.ts.constructorParameter('stub', { type: ast_1.ts.refs.easyNetworkStub.easyNetworkStub() }),
|
|
92
90
|
ast_1.ts.constructorParameter('options', {
|
|
93
|
-
type: ast_1.ts.refs.partial([ctx.refs.easyNetworkStubWrapperOptions()]
|
|
91
|
+
type: ast_1.ts.refs.partial([ctx.refs.easyNetworkStubWrapperOptions()]),
|
|
94
92
|
optional: true,
|
|
95
93
|
}),
|
|
96
94
|
],
|
|
@@ -98,16 +96,14 @@ class TypeScriptEasyNetworkStubsGenerator extends core_1.OpenApiServicesGenerati
|
|
|
98
96
|
}),
|
|
99
97
|
ast_1.ts.property('requests', {
|
|
100
98
|
accessModifier: 'public',
|
|
101
|
-
type: ast_1.ts.arrayType(ctx.refs.stubRequestItem(
|
|
99
|
+
type: ast_1.ts.arrayType(ctx.refs.stubRequestItem(), { readonly: true }),
|
|
102
100
|
get: ast_1.ts.property.getter({
|
|
103
101
|
body: (0, core_1.appendValueGroup)(['return this._stubWrapper.requests;'], '\n'),
|
|
104
102
|
}),
|
|
105
103
|
}),
|
|
106
104
|
...Object.entries(ctx.output.typescript.stubs).map(([id, x]) => ast_1.ts.property((0, core_1.toCasing)(serviceNames[id], ctx.config.propertyNameCasing), {
|
|
107
105
|
accessModifier: 'public',
|
|
108
|
-
type: ctx.refs.easyNetworkStubGroup([ast_1.ts.reference(x.component, x.filePath), 'this'],
|
|
109
|
-
importType: 'type-import',
|
|
110
|
-
}),
|
|
106
|
+
type: ctx.refs.easyNetworkStubGroup([ast_1.ts.reference(x.component, x.filePath), 'this']),
|
|
111
107
|
get: ast_1.ts.property.getter({
|
|
112
108
|
body: (0, core_1.appendValueGroup)([
|
|
113
109
|
(0, core_1.builderTemplate) `return this.${(0, core_1.toCasing)(serviceNames[id], fieldCasing)} ??= ${ctx.refs.createEasyNetworkStubGroup.infer()}(this, this._stubWrapper, ${ast_1.ts.reference(x.component, x.filePath)});`,
|
|
@@ -28,3 +28,4 @@ export const nonNullable = tsReference.genericFactory('NonNullable');
|
|
|
28
28
|
export const parameters = tsReference.genericFactory('Parameters');
|
|
29
29
|
export const returnType = tsReference.genericFactory('ReturnType');
|
|
30
30
|
export const instanceType = tsReference.genericFactory('InstanceType');
|
|
31
|
+
export const blob = tsReference.factory('Blob');
|
|
@@ -16,15 +16,25 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
|
|
|
16
16
|
generator: (b) => b.append(fileContent),
|
|
17
17
|
});
|
|
18
18
|
const exports = fileContent.values.filter((x) => typeof x === 'object' && x !== null && 'export' in x && x.export === true && 'name' in x);
|
|
19
|
-
const
|
|
19
|
+
const node = exports.find((x) => x.name === name);
|
|
20
20
|
return {
|
|
21
21
|
component: name,
|
|
22
22
|
filePath,
|
|
23
|
-
imports: [
|
|
23
|
+
imports: [
|
|
24
|
+
{
|
|
25
|
+
kind: 'file',
|
|
26
|
+
name,
|
|
27
|
+
modulePath: filePath,
|
|
28
|
+
type: node instanceof ts.Interface || node instanceof ts.TypeAlias ? 'type-import' : 'import',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
24
31
|
additionalExports: exports
|
|
25
32
|
.filter((x) => x.name !== name)
|
|
26
|
-
.map((x) => ({
|
|
27
|
-
|
|
33
|
+
.map((x) => ({
|
|
34
|
+
name: x.name,
|
|
35
|
+
type: x instanceof ts.TypeAlias || x instanceof ts.Interface ? 'type-export' : 'export',
|
|
36
|
+
})),
|
|
37
|
+
kind: this.getNodeKind(node),
|
|
28
38
|
};
|
|
29
39
|
}
|
|
30
40
|
else {
|
|
@@ -32,9 +42,20 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
|
|
|
32
42
|
builder.append(this.getType(ctx, ctx.schema));
|
|
33
43
|
const imports = builder.imports.imports;
|
|
34
44
|
builder.imports.clear();
|
|
35
|
-
return { component: builder.toString(false), imports
|
|
45
|
+
return { component: builder.toString(false), imports };
|
|
36
46
|
}
|
|
37
47
|
}
|
|
48
|
+
getNodeKind(node) {
|
|
49
|
+
if (node instanceof ts.Interface)
|
|
50
|
+
return 'interface';
|
|
51
|
+
if (node instanceof ts.TypeAlias)
|
|
52
|
+
return 'type';
|
|
53
|
+
if (node instanceof ts.Enum)
|
|
54
|
+
return 'enum';
|
|
55
|
+
if (node instanceof ts.Class)
|
|
56
|
+
return 'class';
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
38
59
|
getFileContent(ctx) {
|
|
39
60
|
var _a;
|
|
40
61
|
const content = appendValueGroup([], '\n');
|
|
@@ -179,7 +200,7 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
|
|
|
179
200
|
case 'number':
|
|
180
201
|
return 'number';
|
|
181
202
|
case 'string':
|
|
182
|
-
return
|
|
203
|
+
return this.getStringType(ctx, schema);
|
|
183
204
|
case 'null':
|
|
184
205
|
return 'null';
|
|
185
206
|
case 'unknown':
|
|
@@ -198,6 +219,12 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
|
|
|
198
219
|
return this.getAnyType(ctx);
|
|
199
220
|
}
|
|
200
221
|
}
|
|
222
|
+
getStringType(ctx, schema) {
|
|
223
|
+
if (schema.format === 'binary') {
|
|
224
|
+
return ts.refs.blob();
|
|
225
|
+
}
|
|
226
|
+
return 'string';
|
|
227
|
+
}
|
|
201
228
|
getArrayType(ctx, schema) {
|
|
202
229
|
var _a;
|
|
203
230
|
return ts.arrayType((_a = this.getType(ctx, schema.items)) !== null && _a !== void 0 ? _a : this.getAnyType(ctx), {
|
|
@@ -266,7 +293,7 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
|
|
|
266
293
|
return ts.unionType(schema.type.map((x) => {
|
|
267
294
|
switch (x) {
|
|
268
295
|
case 'string':
|
|
269
|
-
return
|
|
296
|
+
return this.getStringType(ctx, schema);
|
|
270
297
|
case 'number':
|
|
271
298
|
case 'integer':
|
|
272
299
|
return 'number';
|
|
@@ -55,7 +55,9 @@ export class TypeScriptModelsGenerator extends OpenApiSchemasGenerationProviderB
|
|
|
55
55
|
if (!filePath)
|
|
56
56
|
return [];
|
|
57
57
|
return [
|
|
58
|
-
ts.export(x.component, filePath, {
|
|
58
|
+
ts.export(x.component, filePath, {
|
|
59
|
+
kind: x.kind === 'type' || x.kind === 'interface' ? 'type-export' : 'export',
|
|
60
|
+
}),
|
|
59
61
|
...((_b = (_a = x.additionalExports) === null || _a === void 0 ? void 0 : _a.map((e) => typeof e === 'string' ? ts.export(e, filePath) : ts.export(e.name, filePath, { kind: e.type }))) !== null && _b !== void 0 ? _b : []),
|
|
60
62
|
];
|
|
61
63
|
}));
|
|
@@ -79,15 +79,13 @@ export class TypeScriptEasyNetworkStubsGenerator extends OpenApiServicesGenerati
|
|
|
79
79
|
...Object.entries(ctx.output.typescript.stubs).map(([id, x]) => ts.property(toCasing(serviceNames[id], fieldCasing), {
|
|
80
80
|
accessModifier: 'private',
|
|
81
81
|
optional: true,
|
|
82
|
-
type: ctx.refs.easyNetworkStubGroup([ts.reference(x.component, x.filePath), 'this'],
|
|
83
|
-
importType: 'type-import',
|
|
84
|
-
}),
|
|
82
|
+
type: ctx.refs.easyNetworkStubGroup([ts.reference(x.component, x.filePath), 'this']),
|
|
85
83
|
})),
|
|
86
84
|
ts.constructor({
|
|
87
85
|
parameters: [
|
|
88
86
|
ts.constructorParameter('stub', { type: ts.refs.easyNetworkStub.easyNetworkStub() }),
|
|
89
87
|
ts.constructorParameter('options', {
|
|
90
|
-
type: ts.refs.partial([ctx.refs.easyNetworkStubWrapperOptions()]
|
|
88
|
+
type: ts.refs.partial([ctx.refs.easyNetworkStubWrapperOptions()]),
|
|
91
89
|
optional: true,
|
|
92
90
|
}),
|
|
93
91
|
],
|
|
@@ -95,16 +93,14 @@ export class TypeScriptEasyNetworkStubsGenerator extends OpenApiServicesGenerati
|
|
|
95
93
|
}),
|
|
96
94
|
ts.property('requests', {
|
|
97
95
|
accessModifier: 'public',
|
|
98
|
-
type: ts.arrayType(ctx.refs.stubRequestItem(
|
|
96
|
+
type: ts.arrayType(ctx.refs.stubRequestItem(), { readonly: true }),
|
|
99
97
|
get: ts.property.getter({
|
|
100
98
|
body: appendValueGroup(['return this._stubWrapper.requests;'], '\n'),
|
|
101
99
|
}),
|
|
102
100
|
}),
|
|
103
101
|
...Object.entries(ctx.output.typescript.stubs).map(([id, x]) => ts.property(toCasing(serviceNames[id], ctx.config.propertyNameCasing), {
|
|
104
102
|
accessModifier: 'public',
|
|
105
|
-
type: ctx.refs.easyNetworkStubGroup([ts.reference(x.component, x.filePath), 'this'],
|
|
106
|
-
importType: 'type-import',
|
|
107
|
-
}),
|
|
103
|
+
type: ctx.refs.easyNetworkStubGroup([ts.reference(x.component, x.filePath), 'this']),
|
|
108
104
|
get: ts.property.getter({
|
|
109
105
|
body: appendValueGroup([
|
|
110
106
|
s `return this.${toCasing(serviceNames[id], fieldCasing)} ??= ${ctx.refs.createEasyNetworkStubGroup.infer()}(this, this._stubWrapper, ${ts.reference(x.component, x.filePath)});`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goast/typescript",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8-beta1",
|
|
4
4
|
"repository": "https://github.com/MaSch0212/goast.git",
|
|
5
5
|
"description": "Provides gOAst generators for generating TypeScript code from OpenAPI specifications.",
|
|
6
6
|
"keywords": [
|
|
@@ -189,3 +189,9 @@ export declare const instanceType: (<TBuilder extends import("@goast/core").Sour
|
|
|
189
189
|
moduleNameOrfilePath: import("@goast/core").Nullable<string>;
|
|
190
190
|
infer: <TBuilder extends import("@goast/core").SourceBuilder>() => import("../nodes/reference").TsReference<TBuilder, never>;
|
|
191
191
|
};
|
|
192
|
+
export declare const blob: (<TBuilder extends import("@goast/core").SourceBuilder>(options?: {
|
|
193
|
+
importType?: import("@goast/core").Nullable<import("../../common-results").TypeScriptImportType>;
|
|
194
|
+
}) => import("../nodes/reference").TsReference<TBuilder, never>) & {
|
|
195
|
+
refName: string;
|
|
196
|
+
moduleNameOrfilePath: import("@goast/core").Nullable<string>;
|
|
197
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypeScriptExportOptions } from './import-collection';
|
|
2
|
+
export type TypeScriptComponentOutputKind = 'interface' | 'type' | 'enum' | 'class' | 'function' | 'variable';
|
|
2
3
|
export type TypeScriptComponentOutput = {
|
|
3
4
|
component: string;
|
|
4
5
|
filePath?: string;
|
|
@@ -6,7 +7,7 @@ export type TypeScriptComponentOutput = {
|
|
|
6
7
|
additionalExports?: string[] | ({
|
|
7
8
|
name: string;
|
|
8
9
|
} & TypeScriptExportOptions)[];
|
|
9
|
-
kind
|
|
10
|
+
kind?: TypeScriptComponentOutputKind;
|
|
10
11
|
};
|
|
11
12
|
export type TypeScriptExportOutput = {
|
|
12
13
|
component: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ApiSchema, AppendValueGroup, ArrayLikeApiSchema, CombinedLikeApiSchema, Nullable, ObjectLikeApiSchema } from '@goast/core';
|
|
1
|
+
import { ApiSchema, AppendValueGroup, ArrayLikeApiSchema, CombinedLikeApiSchema, Nullable, ObjectLikeApiSchema, StringLikeApiSchema } from '@goast/core';
|
|
2
2
|
import { TypeScriptModelGeneratorContext, TypeScriptModelGeneratorOutput } from './models';
|
|
3
3
|
import { ts } from '../../ast';
|
|
4
|
+
import { TypeScriptComponentOutputKind } from '../../common-results';
|
|
4
5
|
import { TypeScriptFileBuilder } from '../../file-builder';
|
|
5
6
|
import { TypeScriptFileGenerator } from '../file-generator';
|
|
6
7
|
type Context = TypeScriptModelGeneratorContext;
|
|
@@ -11,6 +12,7 @@ export interface TypeScriptModelGenerator<TOutput extends Output = Output> {
|
|
|
11
12
|
}
|
|
12
13
|
export declare class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator<Context, Output> implements TypeScriptModelGenerator {
|
|
13
14
|
generate(ctx: Context): Output;
|
|
15
|
+
protected getNodeKind(node: unknown): TypeScriptComponentOutputKind | undefined;
|
|
14
16
|
protected getFileContent(ctx: Context): AppendValueGroup<Builder>;
|
|
15
17
|
protected getEnum(ctx: Context): ts.Enum<import("@goast/core").SourceBuilder<never>, never>;
|
|
16
18
|
protected getInterface(ctx: Context, schema: ObjectLikeApiSchema): ts.Interface<Builder, never>;
|
|
@@ -22,6 +24,7 @@ export declare class DefaultTypeScriptModelGenerator extends TypeScriptFileGener
|
|
|
22
24
|
skipSchemas?: boolean;
|
|
23
25
|
useBaseType?: boolean;
|
|
24
26
|
}): ts.Type<Builder> | null;
|
|
27
|
+
protected getStringType(ctx: Context, schema: StringLikeApiSchema): ts.Type<Builder>;
|
|
25
28
|
protected getArrayType(ctx: Context, schema: ArrayLikeApiSchema): ts.Type<Builder>;
|
|
26
29
|
protected getObjectType(ctx: Context, schema: ObjectLikeApiSchema): ts.Type<Builder>;
|
|
27
30
|
protected getDiscriminatorType(ctx: Context, schema: ApiSchema): ts.Type<Builder>;
|