forked from loafle/openapi-generator-original
* Issue #3084: add hideGenerationTimestamp option to Go server generator. * Issue #3084: use hideGenerationTimestamp in go server sample script. * Update Go server samples.
This commit is contained in:
parent
b37a7c81b0
commit
f0b9c2b761
@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver "
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true "
|
||||||
|
|
||||||
java $JAVA_OPTS -Dservice -jar $executable $ags
|
java $JAVA_OPTS -Dservice -jar $executable $ags
|
||||||
|
@ -126,6 +126,9 @@ public class GoServerCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
cliOptions.clear();
|
cliOptions.clear();
|
||||||
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
|
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Go package name (convention: lowercase).")
|
||||||
.defaultValue("swagger"));
|
.defaultValue("swagger"));
|
||||||
|
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "hides the timestamp when files were generated")
|
||||||
|
.defaultValue(Boolean.TRUE.toString()));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Additional Properties. These values can be passed to the templates and
|
* Additional Properties. These values can be passed to the templates and
|
||||||
* are available in models, apis, and supporting files
|
* are available in models, apis, and supporting files
|
||||||
|
@ -14,8 +14,8 @@ To see how to make this your own, look here:
|
|||||||
|
|
||||||
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
||||||
|
|
||||||
- API version: {{appVersion}}
|
- API version: {{appVersion}}{{^hideGenerationTimestamp}}
|
||||||
- Build date: {{generatedDate}}
|
- Build date: {{generatedDate}}{{/hideGenerationTimestamp}}
|
||||||
{{#infoUrl}}
|
{{#infoUrl}}
|
||||||
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
||||||
{{/infoUrl}}
|
{{/infoUrl}}
|
||||||
|
@ -13,7 +13,6 @@ To see how to make this your own, look here:
|
|||||||
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0
|
||||||
- Build date: 2017-03-02T21:08:51.368+01:00
|
|
||||||
|
|
||||||
|
|
||||||
### Running the server
|
### Running the server
|
||||||
|
Loading…
x
Reference in New Issue
Block a user