From 44705b566d9d1b210532c8b2f8f646c177728b06 Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 6 Jul 2015 15:21:24 +0800 Subject: [PATCH] add default version for package --- .../java/io/swagger/codegen/languages/PhpClientCodegen.java | 2 +- .../src/main/resources/php/configuration.mustache | 2 +- samples/client/petstore/php/SwaggerClient-php/composer.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index c6e6d65596c..4034b966cb6 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -20,7 +20,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { protected String groupId = "swagger"; protected String artifactId = "swagger-client"; protected String packagePath = "SwaggerClient-php"; - protected String artifactVersion = null; + protected String artifactVersion = "1.0.0"; protected String srcBasePath = "lib"; public PhpClientCodegen() { diff --git a/modules/swagger-codegen/src/main/resources/php/configuration.mustache b/modules/swagger-codegen/src/main/resources/php/configuration.mustache index 710edab55b6..a1d8c78c40e 100644 --- a/modules/swagger-codegen/src/main/resources/php/configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/php/configuration.mustache @@ -302,7 +302,7 @@ class Configuration { $report .= " OS: ".php_uname()."\n"; $report .= " PHP Version: ".phpversion()."\n"; $report .= " Swagger Spec Version: {{version}}\n"; - $report .= " SDK Package Version: {{version}}\n"; + $report .= " SDK Package Version: {{artifactVersion}}\n"; $report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n"; return $report; diff --git a/samples/client/petstore/php/SwaggerClient-php/composer.json b/samples/client/petstore/php/SwaggerClient-php/composer.json index 5a76d804876..3b432d83b92 100644 --- a/samples/client/petstore/php/SwaggerClient-php/composer.json +++ b/samples/client/petstore/php/SwaggerClient-php/composer.json @@ -1,5 +1,6 @@ { "name": "swagger/swagger-client", + "version": "1.0.0", "description": "", "keywords": [ "swagger",