File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/main/java/io/swagger/codegen/v3/generators/typescript Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,12 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode
45
45
public static final String NG_VERSION = "ngVersion" ;
46
46
public static final String NG_PACKAGR = "useNgPackagr" ;
47
47
public static final String PROVIDED_IN_ROOT ="providedInRoot" ;
48
+ public static final String KEBAB_FILE_NAME ="kebab-file-name" ;
48
49
49
50
protected String npmName = null ;
50
51
protected String npmVersion = "1.0.0" ;
51
52
protected String npmRepository = null ;
53
+ protected boolean kebabFileNaming ;
52
54
53
55
public TypeScriptAngularClientCodegen () {
54
56
super ();
@@ -229,6 +231,8 @@ public void processOpts() {
229
231
}
230
232
}
231
233
234
+ kebabFileNaming = Boolean .parseBoolean (String .valueOf (additionalProperties .get (KEBAB_FILE_NAME )));
235
+
232
236
}
233
237
234
238
private SemVer determineNgVersion () {
@@ -496,6 +500,9 @@ public String toApiFilename(String name) {
496
500
if (name .length () == 0 ) {
497
501
return "default.service" ;
498
502
}
503
+ if (kebabFileNaming ) {
504
+ return dashize (name );
505
+ }
499
506
return camelize (name , true ) + ".service" ;
500
507
}
501
508
@@ -506,6 +513,9 @@ public String toApiImport(String name) {
506
513
507
514
@ Override
508
515
public String toModelFilename (String name ) {
516
+ if (kebabFileNaming ) {
517
+ return dashize (name );
518
+ }
509
519
return camelize (toModelName (name ), true );
510
520
}
511
521
You can’t perform that action at this time.
0 commit comments