openapi-generator/samples/client/petstore/php/SwaggerClient-php
2015-05-31 11:17:59 +08:00
..
lib add test case for default header 2015-05-31 11:17:59 +08:00
tests Merge pull request #778 from wing328/php_apiclient_instance 2015-05-23 08:54:33 -07:00
composer.json update method name based on style guide, update petstore sample 2015-04-17 00:26:06 +08:00
pom.xml bug fix for post (model) and update php test cases 2015-04-17 20:01:58 +08:00
README.md add back php unit testing and readme to PHP SwaggerClient sample code 2015-04-17 00:26:06 +08:00
SwaggerClient.php remove php comment 2015-05-07 13:35:19 +08:00

Requirements

PHP 5.3.3 and later.

Composer

You can install the bindings via Composer. Add this to your composer.json:

{
    "repositories": [
    {
        "type": "git",
        "url": "https://github.com/wing328/SwaggerPetstore-php.git"
    }
    ],
    "require": {
        "SwaggerPetstore/SwaggerPetstore-php": "*@dev"
    }
}

Then install via:

composer install

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the SwaggerPetstore.php file.

require_once('/path/to/SwaggerPetstore-php/SwaggerPetstore.php');

Getting Started

php test.php

Documentation

TODO

Tests

In order to run tests first install PHPUnit via Composer:

composer update

To run the test suite:

./vendor/bin/phpunit tests