[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.processOpts();
config.preprocessSwagger(swagger); 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("generatedDate", DateTime.now().toString());
config.additionalProperties().put("generatorClass", config.getClass().getName()); config.additionalProperties().put("generatorClass", config.getClass().getName());
config.additionalProperties().put("inputSpec", config.getInputSpec()); config.additionalProperties().put("inputSpec", config.getInputSpec());

View File

@ -9,3 +9,4 @@
{{#version}}OpenAPI spec version: {{version}}{{/version}} {{#version}}OpenAPI spec version: {{version}}{{/version}}
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: {{{generatorVersion}}}

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -6,6 +6,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end

View File

@ -8,6 +8,7 @@
OpenAPI spec version: 1.0.0 OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-codegen.git Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.2.3-SNAPSHOT
=end =end