add example to config option, replace localhost with basePath

This commit is contained in:
wing328 2015-08-13 23:27:59 +08:00
parent 84ff5cfc87
commit b971aa7433
3 changed files with 9 additions and 9 deletions

View File

@ -79,12 +79,12 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("object", "object");
typeMapping.put("DateTime", "\\DateTime");
cliOptions.add(new CliOption("invokerPackage", "The main namespace to use for all classes."));
cliOptions.add(new CliOption("packagePath", "The main package name for classes."));
cliOptions.add(new CliOption("invokerPackage", "The main namespace to use for all classes. e.g. Yay\\Pets"));
cliOptions.add(new CliOption("packagePath", "The main package name for classes. e.g. GeneratedPetstore"));
cliOptions.add(new CliOption("srcBasePath", "The directory under packagePath to serve as source root."));
cliOptions.add(new CliOption("composerVendorName", "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name."));
cliOptions.add(new CliOption("composerProjectName", "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name."));
cliOptions.add(new CliOption("artifactVersion", "The version to use in the composer package version field."));
cliOptions.add(new CliOption("composerVendorName", "The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets"));
cliOptions.add(new CliOption("composerProjectName", "The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client"));
cliOptions.add(new CliOption("artifactVersion", "The version to use in the composer package version field. e.g. 1.2.3"));
}
public String getPackagePath() {

View File

@ -89,7 +89,7 @@ class Configuration
*
* @var string
*/
protected $host = 'http://localhost';
protected $host = '{{basePath}}';
/**
* Timeout (second) of the HTTP request, by default set to 0, no timeout
@ -103,7 +103,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = "PHP-Swagger";
protected $userAgent = "PHP-Swagger/{{artifactVersion}}";
/**
* Debug switch (default set to false)

View File

@ -89,7 +89,7 @@ class Configuration
*
* @var string
*/
protected $host = 'http://localhost';
protected $host = 'http://petstore.swagger.io/v2';
/**
* Timeout (second) of the HTTP request, by default set to 0, no timeout
@ -103,7 +103,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = "PHP-Swagger";
protected $userAgent = "PHP-Swagger/1.0.0";
/**
* Debug switch (default set to false)