File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
generators/src/main/java/com/algolia/codegen/cts/manager Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,10 @@ public class JavaScriptCTSManager implements CTSManager {
11
11
12
12
private final String client ;
13
13
private final JsonNode openApiToolsConfig ;
14
- private final String packageName ;
15
14
16
15
public JavaScriptCTSManager (String client ) {
17
16
this .client = client ;
18
17
this .openApiToolsConfig = Utils .readJsonFile ("config/openapitools.json" ).get ("generator-cli" ).get ("generators" );
19
-
20
- String output = this .openApiToolsConfig .get ("javascript-" + client ).get ("output" ).asText ();
21
- this .packageName = Utils .getClientConfigField ("javascript" , "npmNamespace" ) + "/" + output .substring (output .lastIndexOf ('/' ) + 1 );
22
18
}
23
19
24
20
@ Override
@@ -30,7 +26,10 @@ public void addSupportingFiles(List<SupportingFile> supportingFiles) {
30
26
public void addDataToBundle (Map <String , Object > bundle ) throws GeneratorException {
31
27
bundle .put ("packageDependencies" , this .getPackageDependencies ());
32
28
bundle .put ("utilsPackageVersion" , Utils .getClientConfigField ("javascript" , "utilsPackageVersion" ));
33
- bundle .put ("import" , this .packageName );
29
+
30
+ String output = this .openApiToolsConfig .get ("javascript-" + client ).get ("output" ).asText ();
31
+ String packageName = Utils .getClientConfigField ("javascript" , "npmNamespace" ) + "/" + output .substring (output .lastIndexOf ('/' ) + 1 );
32
+ bundle .put ("import" , packageName );
34
33
}
35
34
36
35
private List <Map <String , String >> getPackageDependencies () {
You can’t perform that action at this time.
0 commit comments