Skip to content

[JMeter] Rename codegen class, template folder #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@

import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.*;
import org.openapitools.codegen.mustache.*;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These unused import was deleted via Intellij IDEA.

import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.*;
import io.swagger.v3.oas.models.media.*;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.parameters.*;
import io.swagger.v3.oas.models.info.Info;

import java.util.*;
import java.io.File;

public class JMeterCodegen extends DefaultCodegen implements CodegenConfig {
public class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig {

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

public JMeterCodegen() {
public JMeterClientCodegen() {
super();

// set the output folder here
outputFolder = "generated-code/JMeterCodegen";
outputFolder = "generated-code/JMeterClientCodegen";

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

/*
* Api Package. Optional, if needed, this can be used in templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ org.openapitools.codegen.languages.JavaResteasyEapServerCodegen
org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen
org.openapitools.codegen.languages.JavascriptClientCodegen
org.openapitools.codegen.languages.JavascriptClosureAngularClientCodegen
org.openapitools.codegen.languages.JMeterCodegen
org.openapitools.codegen.languages.JMeterClientCodegen
org.openapitools.codegen.languages.LuaClientCodegen
org.openapitools.codegen.languages.NodeJSServerCodegen
org.openapitools.codegen.languages.ObjcClientCodegen
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/jmeter/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.3-SNAPSHOT
3.0.3-SNAPSHOT
2 changes: 1 addition & 1 deletion samples/client/petstore/jmeter/PetApi.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
testCase,httpStatusCode,body,petId,apiKey,status,tags,petId,body,petId,name,status,petId,additionalMetadata,file
testCase,httpStatusCode,pet,petId,apiKey,status,tags,petId,pet,petId,name,status,petId,additionalMetadata,file
Success,200,0,0,0,0,0,0,0,0,0,0,0,0,0
2 changes: 1 addition & 1 deletion samples/client/petstore/jmeter/StoreApi.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
testCase,httpStatusCode,orderId,orderId,body
testCase,httpStatusCode,orderId,orderId,order
Success,200,0,0,0
2 changes: 1 addition & 1 deletion samples/client/petstore/jmeter/UserApi.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
testCase,httpStatusCode,body,body,body,username,username,username,password,username,body
testCase,httpStatusCode,user,user,user,username,username,username,password,username,user
Success,200,0,0,0,0,0,0,0,0,0