-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getter and Setter for hideGenerationTimestamp (#7998)
* Create unit test to control regressions * Change HIDE_GENERATION_TIMESTAMP handling * Add new test case: set values with the setters * Add 'isHideGenerationTimestamp()' getter
- Loading branch information
Showing
46 changed files
with
1,011 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ public ObjcClientCodegen() { | |
modelDocTemplateFiles.put("model_doc.mustache", ".md"); | ||
apiDocTemplateFiles.put("api_doc.mustache", ".md"); | ||
|
||
// default HIDE_GENERATION_TIMESTAMP to true | ||
hideGenerationTimestamp = Boolean.TRUE; | ||
|
||
defaultIncludes.clear(); | ||
defaultIncludes.add("bool"); | ||
defaultIncludes.add("BOOL"); | ||
|
@@ -167,7 +170,7 @@ public ObjcClientCodegen() { | |
cliOptions.add(new CliOption(AUTHOR_EMAIL, "Email to use in the podspec file.").defaultValue("[email protected]")); | ||
cliOptions.add(new CliOption(GIT_REPO_URL, "URL for the git repo where this podspec should point to.") | ||
.defaultValue("https://github.com/swagger-api/swagger-codegen")); | ||
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "hides the timestamp when files were generated") | ||
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) | ||
.defaultValue(Boolean.TRUE.toString())); | ||
} | ||
|
||
|
@@ -190,14 +193,6 @@ public String getHelp() { | |
public void processOpts() { | ||
super.processOpts(); | ||
|
||
// default HIDE_GENERATION_TIMESTAMP to true | ||
if (!additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) { | ||
additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, Boolean.TRUE.toString()); | ||
} else { | ||
additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, | ||
Boolean.valueOf(additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP).toString())); | ||
} | ||
|
||
if (additionalProperties.containsKey(POD_NAME)) { | ||
setPodName((String) additionalProperties.get(POD_NAME)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.