openapi-generator/samples/client/petstore-security-test/php
2018-11-30 10:16:16 +08:00
..
.openapi-generator [PHP] Fix deserialize ApiException as a Model (#757) 2018-09-07 00:52:59 +09:00
docs [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
lib [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
OpenAPIClient-php Merge remote-tracking branch 'origin' into 4.0.x 2018-11-30 10:16:16 +08:00
OpenAPIToolsClient-php #126: Not-required properties now shows as nullable (#129) 2018-05-28 21:33:55 +08:00
test [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
.gitignore [PHP] Add gitignore to AbstractPhpCodegen (#765) 2018-08-20 12:16:01 +08:00
.openapi-generator-ignore Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
.php_cs [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
.travis.yml [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
composer.json [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
git_push.sh [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
LICENSE create new spec for security testing 2016-06-28 11:48:52 +08:00
phpunit.xml.dist [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00
README.md [PHP] Upgrade php-cs-fixer to 2.12, enables PHP >= 7.2 support (#769) 2018-09-06 20:48:00 +09:00

OpenAPIClient-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 OpenAPI Generator project:

  • API version: 1.0.0 *_/ ' " =end -- \r\n \n \r
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 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/OpenAPIClient-php/vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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

$apiInstance = new OpenAPI\Client\Api\FakeApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$unknown_base_type = new \OpenAPI\Client\Model\UNKNOWN_BASE_TYPE(); // \OpenAPI\Client\Model\UNKNOWN_BASE_TYPE | 

try {
    $apiInstance->testCodeInjectEndRnNR($unknown_base_type);
} catch (Exception $e) {
    echo 'Exception when calling FakeApi->testCodeInjectEndRnNR: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to *http://petstore.swagger.io / ' &quot; =end -- \r\n \n \r/v2 */ ' &quot; =end -- \r\n \n \r

Class Method HTTP request Description
FakeApi testCodeInjectEndRnNR PUT /fake To test code injection *_/ ' &quot; =end -- \r\n \n \r

Documentation For Models

Documentation For Authorization

api_key

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

petstore_auth

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: http://petstore.swagger.io/api/oauth/dialog
  • Scopes:
  • write:pets: modify pets in your account *_/ ' " =end -- \r\n \n \r
  • read:pets: read your pets *_/ ' " =end -- \r\n \n \r

Author

something@something.abc *_/ ' &quot; =end -- \r\n \n \r