[Ruby] add generator version to Ruby template (#5459)

* add generator version to ruby template

* remove tab in java generator
This commit is contained in:
wing328
2017-04-23 22:41:56 +08:00
committed by GitHub
parent ee5c1b203b
commit 1277db61bd
45 changed files with 46 additions and 1 deletions

View File

@@ -126,6 +126,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
}
config.processOpts();
config.preprocessSwagger(swagger);
// TODO need to obtain version from a file instead of hardcoding it
config.additionalProperties().put("generatorVersion", "2.2.3-SNAPSHOT");
config.additionalProperties().put("generatedDate", DateTime.now().toString());
config.additionalProperties().put("generatorClass", config.getClass().getName());
config.additionalProperties().put("inputSpec", config.getInputSpec());

View File

@@ -709,7 +709,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
if(p.getExample() != null) {
return escapeText(p.getExample().toString());
} else {
return super.toExampleValue(p);
return super.toExampleValue(p);
}
}