Daniel Ge b16eda17e8 Improve error message for connection failures
Previous ApiException message would simply print out the result of the
`curl_getinfo($curl)` call, which might be useful only if the developer
actually wanted very low-level information from curl about why a call
failed. The new message should print out a higher-level but more
informative, human-readable message. If necessary for debugging, the
ApiException's responseObject is set to the `curl_getinfo($curl)`.
2016-07-06 12:09:41 -07:00
..
2016-07-06 12:09:11 -07:00
2016-06-28 11:48:52 +08:00
2016-07-06 12:09:11 -07:00
2016-06-28 11:48:52 +08:00

SwaggerClient-php

This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ */ ' " =end

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0 */ ' " =end
  • Build date: 2016-07-06T12:09:22.895-07:00
  • Build package: class io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\FakeApi();
$test_code_inject____end = "test_code_inject____end_example"; // string | To test code injection */ ' \" =end

try {
    $api_instance->testCodeInjectEnd($test_code_inject____end);
} catch (Exception $e) {
    echo 'Exception when calling FakeApi->testCodeInjectEnd: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 / ' " =end

Class Method HTTP request Description
FakeApi testCodeInjectEnd PUT /fake To test code injection */ ' &quot; =end

Documentation For Models

Documentation For Authorization

petstore_auth

api_key

  • Type: API key
  • API key parameter name: api_key */ ' " =end
  • Location: HTTP header

Author

apiteam@swagger.io */ ' " =end