forked from loafle/openapi-generator-original
remove releaseVersion (duplicated with packageVersion)
This commit is contained in:
parent
3c997ea743
commit
df8d4fd8b8
@ -115,9 +115,6 @@ public class Generate implements Runnable {
|
|||||||
@Option(name = {"--release-note"}, title = "release note", description = CodegenConstants.RELEASE_NOTE_DESC)
|
@Option(name = {"--release-note"}, title = "release note", description = CodegenConstants.RELEASE_NOTE_DESC)
|
||||||
private String releaseNote;
|
private String releaseNote;
|
||||||
|
|
||||||
@Option(name = {"--release-version"}, title = "release version", description = CodegenConstants.RELEASE_VERSION_DESC)
|
|
||||||
private String releaseVersion;
|
|
||||||
|
|
||||||
@Option(name = {"--http-user-agent"}, title = "http user agent", description = CodegenConstants.HTTP_USER_AGENT)
|
@Option(name = {"--http-user-agent"}, title = "http user agent", description = CodegenConstants.HTTP_USER_AGENT)
|
||||||
private String httpUserAgent;
|
private String httpUserAgent;
|
||||||
|
|
||||||
@ -210,10 +207,6 @@ public class Generate implements Runnable {
|
|||||||
configurator.setReleaseNote(releaseNote);
|
configurator.setReleaseNote(releaseNote);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isNotEmpty(releaseVersion)) {
|
|
||||||
configurator.setReleaseVersion(releaseVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNotEmpty(httpUserAgent)) {
|
if (isNotEmpty(httpUserAgent)) {
|
||||||
configurator.setHttpUserAgent(httpUserAgent);
|
configurator.setHttpUserAgent(httpUserAgent);
|
||||||
}
|
}
|
||||||
|
@ -180,10 +180,6 @@ public interface CodegenConfig {
|
|||||||
|
|
||||||
String getReleaseNote();
|
String getReleaseNote();
|
||||||
|
|
||||||
void setReleaseVersion(String releaseVersion);
|
|
||||||
|
|
||||||
String getReleaseVersion();
|
|
||||||
|
|
||||||
void setHttpUserAgent(String httpUserAgent);
|
void setHttpUserAgent(String httpUserAgent);
|
||||||
|
|
||||||
String getHttpUserAgent();
|
String getHttpUserAgent();
|
||||||
|
@ -100,9 +100,6 @@ public class CodegenConstants {
|
|||||||
public static final String RELEASE_NOTE = "releaseNote";
|
public static final String RELEASE_NOTE = "releaseNote";
|
||||||
public static final String RELEASE_NOTE_DESC = "Release note, default to 'Minor update'.";
|
public static final String RELEASE_NOTE_DESC = "Release note, default to 'Minor update'.";
|
||||||
|
|
||||||
public static final String RELEASE_VERSION = "releaseVersion";
|
|
||||||
public static final String RELEASE_VERSION_DESC= "Release version, e.g. 1.2.5, default to 0.1.0.";
|
|
||||||
|
|
||||||
public static final String HTTP_USER_AGENT = "httpUserAgent";
|
public static final String HTTP_USER_AGENT = "httpUserAgent";
|
||||||
public static final String HTTP_USER_AGENT_DESC = "HTTP user agent, e.g. codegen_csharp_api_client, default to 'Swagger-Codegen/{releaseVersion}}/{language}'";
|
public static final String HTTP_USER_AGENT_DESC = "HTTP user agent, e.g. codegen_csharp_api_client, default to 'Swagger-Codegen/{releaseVersion}}/{language}'";
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public class DefaultCodegen {
|
|||||||
protected String library;
|
protected String library;
|
||||||
protected Boolean sortParamsByRequiredFlag = true;
|
protected Boolean sortParamsByRequiredFlag = true;
|
||||||
protected Boolean ensureUniqueParams = true;
|
protected Boolean ensureUniqueParams = true;
|
||||||
protected String gitUserId, gitRepoId, releaseNote, releaseVersion;
|
protected String gitUserId, gitRepoId, releaseNote;
|
||||||
protected String httpUserAgent;
|
protected String httpUserAgent;
|
||||||
|
|
||||||
public List<CliOption> cliOptions() {
|
public List<CliOption> cliOptions() {
|
||||||
@ -2414,24 +2414,6 @@ public class DefaultCodegen {
|
|||||||
return releaseNote;
|
return releaseNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set release version.
|
|
||||||
*
|
|
||||||
* @param releaseVersion Release version
|
|
||||||
*/
|
|
||||||
public void setReleaseVersion(String releaseVersion) {
|
|
||||||
this.releaseVersion = releaseVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Release version
|
|
||||||
*
|
|
||||||
* @return Release version
|
|
||||||
*/
|
|
||||||
public String getReleaseVersion() {
|
|
||||||
return releaseVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set HTTP user agent.
|
* Set HTTP user agent.
|
||||||
*
|
*
|
||||||
|
@ -63,7 +63,6 @@ public class CodegenConfigurator {
|
|||||||
private String gitUserId="YOUR_GIT_USR_ID";
|
private String gitUserId="YOUR_GIT_USR_ID";
|
||||||
private String gitRepoId="YOUR_GIT_REPO_ID";
|
private String gitRepoId="YOUR_GIT_REPO_ID";
|
||||||
private String releaseNote="Minor update";
|
private String releaseNote="Minor update";
|
||||||
private String releaseVersion="0.1.0";
|
|
||||||
private String httpUserAgent;
|
private String httpUserAgent;
|
||||||
|
|
||||||
private final Map<String, String> dynamicProperties = new HashMap<String, String>(); //the map that holds the JsonAnySetter/JsonAnyGetter values
|
private final Map<String, String> dynamicProperties = new HashMap<String, String>(); //the map that holds the JsonAnySetter/JsonAnyGetter values
|
||||||
@ -327,15 +326,6 @@ public class CodegenConfigurator {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReleaseVersion() {
|
|
||||||
return releaseVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CodegenConfigurator setReleaseVersion(String releaseVersion) {
|
|
||||||
this.releaseVersion = releaseVersion;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getHttpUserAgent() {
|
public String getHttpUserAgent() {
|
||||||
return httpUserAgent;
|
return httpUserAgent;
|
||||||
}
|
}
|
||||||
@ -374,7 +364,6 @@ public class CodegenConfigurator {
|
|||||||
checkAndSetAdditionalProperty(modelNameSuffix, CodegenConstants.MODEL_NAME_SUFFIX);
|
checkAndSetAdditionalProperty(modelNameSuffix, CodegenConstants.MODEL_NAME_SUFFIX);
|
||||||
checkAndSetAdditionalProperty(gitUserId, CodegenConstants.GIT_USER_ID);
|
checkAndSetAdditionalProperty(gitUserId, CodegenConstants.GIT_USER_ID);
|
||||||
checkAndSetAdditionalProperty(gitRepoId, CodegenConstants.GIT_REPO_ID);
|
checkAndSetAdditionalProperty(gitRepoId, CodegenConstants.GIT_REPO_ID);
|
||||||
checkAndSetAdditionalProperty(releaseVersion, CodegenConstants.RELEASE_VERSION);
|
|
||||||
checkAndSetAdditionalProperty(releaseNote, CodegenConstants.RELEASE_NOTE);
|
checkAndSetAdditionalProperty(releaseNote, CodegenConstants.RELEASE_NOTE);
|
||||||
checkAndSetAdditionalProperty(httpUserAgent, CodegenConstants.HTTP_USER_AGENT);
|
checkAndSetAdditionalProperty(httpUserAgent, CodegenConstants.HTTP_USER_AGENT);
|
||||||
|
|
||||||
|
2
pom.xml
2
pom.xml
@ -549,7 +549,7 @@
|
|||||||
<swagger-parser-version>1.0.18-SNAPSHOT</swagger-parser-version>
|
<swagger-parser-version>1.0.18-SNAPSHOT</swagger-parser-version>
|
||||||
<scala-version>2.11.1</scala-version>
|
<scala-version>2.11.1</scala-version>
|
||||||
<felix-version>2.3.4</felix-version>
|
<felix-version>2.3.4</felix-version>
|
||||||
<swagger-core-version>1.5.7</swagger-core-version>
|
<swagger-core-version>1.5.8</swagger-core-version>
|
||||||
<commons-io-version>2.4</commons-io-version>
|
<commons-io-version>2.4</commons-io-version>
|
||||||
<commons-cli-version>1.2</commons-cli-version>
|
<commons-cli-version>1.2</commons-cli-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user