File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
modules/openapi-generator/src
main/java/org/openapitools/codegen/languages
test/java/org/openapitools/codegen/typescript/typescriptangular Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 29
29
import java .text .SimpleDateFormat ;
30
30
import java .util .*;
31
31
32
- import static org .openapitools .codegen .utils .StringUtils .camelize ;
33
- import static org .openapitools .codegen .utils .StringUtils .underscore ;
34
- import static org .openapitools .codegen .utils .StringUtils .dashize ;
32
+ import static org .openapitools .codegen .utils .StringUtils .*;
35
33
36
34
public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCodegen {
37
35
private static final Logger LOGGER = LoggerFactory .getLogger (TypeScriptAngularClientCodegen .class );
@@ -529,7 +527,7 @@ public String toApiImport(String name) {
529
527
530
528
@ Override
531
529
public String toModelFilename (String name ) {
532
- return this .convertUsingFileNamingConvention (this .sanitizeName (name ) + modelFileSuffix ) ;
530
+ return this .convertUsingFileNamingConvention (this .sanitizeName (name )) + modelFileSuffix ;
533
531
}
534
532
535
533
@ Override
Original file line number Diff line number Diff line change
1
+ package org .openapitools .codegen .typescript .typescriptangular ;
2
+
3
+ import org .junit .Assert ;
4
+ import org .junit .Test ;
5
+ import org .openapitools .codegen .languages .TypeScriptAngularClientCodegen ;
6
+
7
+ public class TypeScriptAngularClientCodegenTest {
8
+ @ Test
9
+ public void testModelFileSuffix () {
10
+ TypeScriptAngularClientCodegen codegen = new TypeScriptAngularClientCodegen ();
11
+ codegen .additionalProperties ().put ("modelFileSuffix" , "MySuffix" );
12
+ codegen .additionalProperties ().put ("modelSuffix" , "MySuffix" );
13
+ codegen .processOpts ();
14
+
15
+ Assert .assertEquals (codegen .toModelFilename ("testName" ), "testNameMySuffix" );
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments