Skip to content

Commit 9e2fcda

Browse files
ackintoshwing328
authored andcommitted
[JMeter] Rename codegen class, template folder (#387)
* Rename JMeter client generator class name * Rename jmeter template folder * Update samples
1 parent 38bb732 commit 9e2fcda

8 files changed

Lines changed: 9 additions & 14 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterCodegen.java renamed to modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JMeterClientCodegen.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,13 @@
1919

2020
import org.openapitools.codegen.*;
2121
import org.openapitools.codegen.utils.*;
22-
import org.openapitools.codegen.mustache.*;
23-
import io.swagger.v3.oas.models.security.SecurityScheme;
2422
import io.swagger.v3.oas.models.*;
2523
import io.swagger.v3.oas.models.media.*;
26-
import io.swagger.v3.oas.models.responses.ApiResponse;
27-
import io.swagger.v3.oas.models.parameters.*;
28-
import io.swagger.v3.oas.models.info.Info;
2924

3025
import java.util.*;
3126
import java.io.File;
3227

33-
public class JMeterCodegen extends DefaultCodegen implements CodegenConfig {
28+
public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig {
3429

3530
// source folder where to write the files
3631
protected String sourceFolder = "";
@@ -69,11 +64,11 @@ public String getHelp() {
6964
return "Generates a JMeter .jmx file.";
7065
}
7166

72-
public JMeterCodegen() {
67+
public JMeterClientCodegen() {
7368
super();
7469

7570
// set the output folder here
76-
outputFolder = "generated-code/JMeterCodegen";
71+
outputFolder = "generated-code/JMeterClientCodegen";
7772

7873
/*
7974
* Api classes. You can write classes for each Api file with the apiTemplateFiles map.
@@ -90,7 +85,7 @@ public JMeterCodegen() {
9085
* Template Location. This is the location which templates will be read from. The generator
9186
* will use the resource stream to attempt to read the templates.
9287
*/
93-
embeddedTemplateDir = templateDir = "JMeter";
88+
embeddedTemplateDir = templateDir = "jmeter-client";
9489

9590
/*
9691
* Api Package. Optional, if needed, this can be used in templates

modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen
4747
org.openapitools.codegen.languages.JavascriptClientCodegen
4848
org.openapitools.codegen.languages.JavascriptFlowtypedClientCodegen
4949
org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
50-
org.openapitools.codegen.languages.JMeterCodegen
50+
org.openapitools.codegen.languages.JMeterClientCodegen
5151
org.openapitools.codegen.languages.LuaClientCodegen
5252
org.openapitools.codegen.languages.NodeJSServerCodegen
5353
org.openapitools.codegen.languages.ObjcClientCodegen

modules/openapi-generator/src/main/resources/JMeter/api.mustache renamed to modules/openapi-generator/src/main/resources/jmeter-client/api.mustache

File renamed without changes.

modules/openapi-generator/src/main/resources/JMeter/testdata-localhost.mustache renamed to modules/openapi-generator/src/main/resources/jmeter-client/testdata-localhost.mustache

File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.3-SNAPSHOT
1+
3.0.3-SNAPSHOT
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
testCase,httpStatusCode,body,petId,apiKey,status,tags,petId,body,petId,name,status,petId,additionalMetadata,file
1+
testCase,httpStatusCode,pet,petId,apiKey,status,tags,petId,pet,petId,name,status,petId,additionalMetadata,file
22
Success,200,0,0,0,0,0,0,0,0,0,0,0,0,0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
testCase,httpStatusCode,orderId,orderId,body
1+
testCase,httpStatusCode,orderId,orderId,order
22
Success,200,0,0,0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
testCase,httpStatusCode,body,body,body,username,username,username,password,username,body
1+
testCase,httpStatusCode,user,user,user,username,username,username,password,username,user
22
Success,200,0,0,0,0,0,0,0,0,0

0 commit comments

Comments
 (0)