mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 12:19:10 +00:00
Update Go generators' default value (#362)
* udpate go client default value * update go generators' default value
This commit is contained in:
@@ -39,7 +39,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
||||
|
||||
protected boolean withXml = false;
|
||||
|
||||
protected String packageName = "swagger";
|
||||
protected String packageName = "openapi";
|
||||
|
||||
public AbstractGoCodegen() {
|
||||
super();
|
||||
@@ -111,7 +111,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
|
||||
|
||||
cliOptions.clear();
|
||||
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
|
||||
.defaultValue("swagger"));
|
||||
.defaultValue("openapi"));
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC)
|
||||
.defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
|
||||
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {
|
||||
setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME));
|
||||
} else {
|
||||
setPackageName("swagger");
|
||||
setPackageName("openapi");
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class GoServerCodegen extends AbstractGoCodegen {
|
||||
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {
|
||||
setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME));
|
||||
} else {
|
||||
setPackageName("swagger");
|
||||
setPackageName("openapi");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -150,8 +150,8 @@ public class GoServerCodegen extends AbstractGoCodegen {
|
||||
*/
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "Generates a Go server library using the swagger-tools project. By default, " +
|
||||
"it will also generate service classes--which you can disable with the `-Dnoservice` environment variable.";
|
||||
return "Generates a Go server library using OpenAPI-Generator. By default, " +
|
||||
"it will also generate service classes -- which you can disable with the `-Dnoservice` environment variable.";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user