forked from loafle/openapi-generator-original
add readme and travis
This commit is contained in:
parent
9ecea4b1f8
commit
bb59ad95cf
@ -223,6 +223,8 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toPackagePath(invokerPackage, srcBasePath), "ObjectSerializer.php"));
|
supportingFiles.add(new SupportingFile("ObjectSerializer.mustache", toPackagePath(invokerPackage, srcBasePath), "ObjectSerializer.php"));
|
||||||
supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
|
supportingFiles.add(new SupportingFile("composer.mustache", getPackagePath(), "composer.json"));
|
||||||
supportingFiles.add(new SupportingFile("autoload.mustache", getPackagePath(), "autoload.php"));
|
supportingFiles.add(new SupportingFile("autoload.mustache", getPackagePath(), "autoload.php"));
|
||||||
|
supportingFiles.add(new SupportingFile("README.mustache", getPackagePath(), "README.md"));
|
||||||
|
supportingFiles.add(new SupportingFile(".travis.yml", getPackagePath(), ".travis.yml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
10
modules/swagger-codegen/src/main/resources/php/.travis.yml
Normal file
10
modules/swagger-codegen/src/main/resources/php/.travis.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
language: php
|
||||||
|
sudo: false
|
||||||
|
php:
|
||||||
|
- 5.4
|
||||||
|
- 5.5
|
||||||
|
- 5.6
|
||||||
|
- 7.0
|
||||||
|
- hhvm
|
||||||
|
before_install: "composer install"
|
||||||
|
script: "phpunit lib/Tests"
|
@ -0,0 +1,47 @@
|
|||||||
|
# {{packagePath}}
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
PHP 5.4.0 and later
|
||||||
|
|
||||||
|
## Installation & Usage
|
||||||
|
### Composer
|
||||||
|
|
||||||
|
You can install the bindings via [Composer](http://getcomposer.org/). Add this to your `composer.json`:
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/YOUR_GITHUB_ID/{{packagePath}}.git"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"require": {
|
||||||
|
"{{composerVendorName}}/{{composerPackageName}}": "*@dev"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then install via `composer install`
|
||||||
|
|
||||||
|
### Manual Installation
|
||||||
|
|
||||||
|
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `{{packagePath}}.php` file.
|
||||||
|
```php
|
||||||
|
require_once('/path/to/{{packagePath}}/autoload.php');
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
To run the unit tests:
|
||||||
|
```
|
||||||
|
composer install
|
||||||
|
./vendor/bin/phpunit lib/Tests
|
||||||
|
```
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}}
|
||||||
|
{{/hasMore}}{{/apis}}{{/apiInfo}}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user