File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
java/io/swagger/codegen/v3/generators/typescript
resources/handlebars/typescript-fetch Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 5
5
import java .util .Date ;
6
6
7
7
import io .swagger .codegen .v3 .CliOption ;
8
+ import io .swagger .codegen .v3 .CodegenConstants ;
8
9
import io .swagger .codegen .v3 .CodegenModel ;
10
+ import io .swagger .codegen .v3 .CodegenParameter ;
9
11
import io .swagger .codegen .v3 .SupportingFile ;
10
12
import io .swagger .v3 .oas .models .media .ArraySchema ;
11
13
import io .swagger .v3 .oas .models .media .BinarySchema ;
@@ -44,8 +46,6 @@ public TypeScriptFetchClientCodegen() {
44
46
this .cliOptions .add (new CliOption (WITH_INTERFACES ,
45
47
"Setting this property to true will generate interfaces next to the default class implementations." ,
46
48
SchemaTypeUtil .BOOLEAN_TYPE ).defaultValue (Boolean .FALSE .toString ()));
47
-
48
- typeMapping .remove ("UUID" );
49
49
}
50
50
51
51
@ Override
@@ -146,6 +146,15 @@ private boolean isLanguageGenericType(String type) {
146
146
return false ;
147
147
}
148
148
149
+ @ Override
150
+ public void postProcessParameter (CodegenParameter parameter ) {
151
+ super .postProcessParameter (parameter );
152
+
153
+ String type = applyLocalTypeMapping (parameter .dataType );
154
+ parameter .dataType = type ;
155
+ parameter .getVendorExtensions ().put (CodegenConstants .IS_PRIMITIVE_TYPE_EXT_NAME , isLanguagePrimitive (type ));
156
+ }
157
+
149
158
private void addNpmPackageGeneration () {
150
159
if (additionalProperties .containsKey (NPM_NAME )) {
151
160
this .setNpmName (additionalProperties .get (NPM_NAME ).toString ());
Original file line number Diff line number Diff line change @@ -67,13 +67,6 @@ export class RequiredError extends Error {
67
67
}
68
68
}
69
69
70
- /**
71
- * Type aliases
72
- * @export
73
- * @type
74
- */
75
- export type UUID = string
76
-
77
70
{ {#models} }
78
71
{ {#model} }{ {#isEnum} }{ {> modelEnum} }{ {/isEnum} }{ {^isEnum} }{ {> modelGeneric} }{ {/isEnum} }{ {/model} }
79
72
{ {/models} }
You can’t perform that action at this time.
0 commit comments