Skip to content

Commit c8b2373

Browse files
committed
added php 3.0.16 composed sample
1 parent 212f00c commit c8b2373

File tree

118 files changed

+22509
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+22509
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Swagger Codegen Ignore
2+
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0.16
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
return Symfony\CS\Config::create()
4+
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
5+
->setUsingCache(true)
6+
->fixers(
7+
[
8+
'ordered_use',
9+
'phpdoc_order',
10+
'short_array_syntax',
11+
'strict',
12+
'strict_param'
13+
]
14+
)
15+
->finder(
16+
Symfony\CS\Finder\DefaultFinder::create()
17+
->in(__DIR__)
18+
);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: php
2+
sudo: false
3+
php:
4+
- 5.4
5+
- 5.5
6+
- 5.6
7+
- 7.0
8+
- hhvm
9+
before_install: "composer install"
10+
script: "vendor/bin/phpunit"
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# SwaggerClient-php
2+
This is a sample Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).
3+
4+
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
5+
6+
- API version: 1.0.0
7+
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
8+
9+
## Requirements
10+
11+
PHP 5.5 and later
12+
13+
## Installation & Usage
14+
### Composer
15+
16+
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
17+
18+
```
19+
{
20+
"repositories": [
21+
{
22+
"type": "git",
23+
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
24+
}
25+
],
26+
"require": {
27+
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
28+
}
29+
}
30+
```
31+
32+
Then run `composer install`
33+
34+
### Manual Installation
35+
36+
Download the files and include `autoload.php`:
37+
38+
```php
39+
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
40+
```
41+
42+
## Tests
43+
44+
To run the unit tests:
45+
46+
```
47+
composer install
48+
./vendor/bin/phpunit
49+
```
50+
51+
## Getting Started
52+
53+
Please follow the [installation procedure](#installation--usage) and then run the following:
54+
55+
```php
56+
<?php
57+
require_once(__DIR__ . '/vendor/autoload.php');
58+
59+
60+
$apiInstance = new Swagger\Client\Api\DefaultApi(
61+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
62+
// This is optional, `GuzzleHttp\Client` will be used as default.
63+
new GuzzleHttp\Client(),
64+
$config
65+
);
66+
67+
try {
68+
$result = $apiInstance->testMethod();
69+
print_r($result);
70+
} catch (Exception $e) {
71+
echo 'Exception when calling DefaultApi->testMethod: ', $e->getMessage(), PHP_EOL;
72+
}
73+
?>
74+
```
75+
76+
## Documentation for API Endpoints
77+
78+
All URIs are relative to */*
79+
80+
Class | Method | HTTP request | Description
81+
------------ | ------------- | ------------- | -------------
82+
*DefaultApi* | [**testMethod**](docs/Api/DefaultApi.md#testmethod) | **GET** /test |
83+
*PetApi* | [**addParrot**](docs/Api/PetApi.md#addparrot) | **POST** /parrot | Add a new parrow to the store
84+
*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
85+
*PetApi* | [**deletePet**](docs/Api/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
86+
*PetApi* | [**feedPet**](docs/Api/PetApi.md#feedpet) | **POST** /pet/feed/{petId} | Find pet by ID
87+
*PetApi* | [**findPetsByStatus**](docs/Api/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
88+
*PetApi* | [**findPetsByTags**](docs/Api/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
89+
*PetApi* | [**getParrots**](docs/Api/PetApi.md#getparrots) | **GET** /parrot | get Parrots
90+
*PetApi* | [**getPetById**](docs/Api/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
91+
*PetApi* | [**updateParrots**](docs/Api/PetApi.md#updateparrots) | **PUT** /parrot | update parrots
92+
*PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
93+
*PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
94+
*PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
95+
*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
96+
*StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
97+
*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
98+
*StoreApi* | [**placeOrder**](docs/Api/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
99+
*UserApi* | [**createUser**](docs/Api/UserApi.md#createuser) | **POST** /user | Create user
100+
*UserApi* | [**createUsersWithArrayInput**](docs/Api/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
101+
*UserApi* | [**createUsersWithListInput**](docs/Api/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
102+
*UserApi* | [**deleteUser**](docs/Api/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
103+
*UserApi* | [**getUserByName**](docs/Api/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
104+
*UserApi* | [**loginUser**](docs/Api/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
105+
*UserApi* | [**logoutUser**](docs/Api/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
106+
*UserApi* | [**userUsernamePut**](docs/Api/UserApi.md#userusernameput) | **PUT** /user/{username} | Updated user
107+
108+
## Documentation For Models
109+
110+
- [AllPetsResponse](docs/Model/AllPetsResponse.md)
111+
- [AnyOfbody2](docs/Model/AnyOfbody2.md)
112+
- [ApiResponse](docs/Model/ApiResponse.md)
113+
- [Body](docs/Model/Body.md)
114+
- [Body1](docs/Model/Body1.md)
115+
- [Body2](docs/Model/Body2.md)
116+
- [Cat](docs/Model/Cat.md)
117+
- [Category](docs/Model/Category.md)
118+
- [Dog](docs/Model/Dog.md)
119+
- [InlineResponse200](docs/Model/InlineResponse200.md)
120+
- [InlineResponse2001](docs/Model/InlineResponse2001.md)
121+
- [Macaw](docs/Model/Macaw.md)
122+
- [OneOfAllPetsResponseItems](docs/Model/OneOfAllPetsResponseItems.md)
123+
- [OneOfPartMasterOrigin](docs/Model/OneOfPartMasterOrigin.md)
124+
- [OneOfPup](docs/Model/OneOfPup.md)
125+
- [OneOfinlineResponse2001](docs/Model/OneOfinlineResponse2001.md)
126+
- [Order](docs/Model/Order.md)
127+
- [Parakeet](docs/Model/Parakeet.md)
128+
- [PartFour](docs/Model/PartFour.md)
129+
- [PartMaster](docs/Model/PartMaster.md)
130+
- [PartOne](docs/Model/PartOne.md)
131+
- [PartThree](docs/Model/PartThree.md)
132+
- [PartTwo](docs/Model/PartTwo.md)
133+
- [Pet](docs/Model/Pet.md)
134+
- [Pup](docs/Model/Pup.md)
135+
- [Tag](docs/Model/Tag.md)
136+
- [Test](docs/Model/Test.md)
137+
- [User](docs/Model/User.md)
138+
- [ValMemberChoice1](docs/Model/ValMemberChoice1.md)
139+
- [ValMemberChoice2](docs/Model/ValMemberChoice2.md)
140+
- [ValMembers](docs/Model/ValMembers.md)
141+
142+
## Documentation For Authorization
143+
144+
145+
## api_key
146+
147+
- **Type**: API key
148+
- **API key parameter name**: api_key
149+
- **Location**: HTTP header
150+
151+
## bearer
152+
153+
- **Type**: HTTP bearer authentication
154+
155+
## petstore_auth
156+
157+
- **Type**: OAuth
158+
- **Flow**: implicit
159+
- **Authorization URL**: http://petstore.swagger.io/oauth/dialog
160+
- **Scopes**:
161+
- ****:
162+
163+
164+
## Author
165+
166+
167+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "GIT_USER_ID/GIT_REPO_ID",
3+
"description": "",
4+
"keywords": [
5+
"swagger",
6+
"php",
7+
"sdk",
8+
"api"
9+
],
10+
"homepage": "http://swagger.io",
11+
"license": "proprietary",
12+
"authors": [
13+
{
14+
"name": "Swagger and contributors",
15+
"homepage": "https://github.com/swagger-api/swagger-codegen"
16+
}
17+
],
18+
"require": {
19+
"php": ">=5.5",
20+
"ext-curl": "*",
21+
"ext-json": "*",
22+
"ext-mbstring": "*",
23+
"guzzlehttp/guzzle": "^6.2"
24+
},
25+
"require-dev": {
26+
"phpunit/phpunit": "^4.8",
27+
"squizlabs/php_codesniffer": "~2.6",
28+
"friendsofphp/php-cs-fixer": "~1.12"
29+
},
30+
"autoload": {
31+
"psr-4": { "Swagger\\Client\\" : "lib/" }
32+
},
33+
"autoload-dev": {
34+
"psr-4": { "Swagger\\Client\\" : "test/" }
35+
}
36+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Swagger\Client\DefaultApi
2+
3+
All URIs are relative to */*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**testMethod**](DefaultApi.md#testmethod) | **GET** /test |
8+
9+
# **testMethod**
10+
> \Swagger\Client\Model\Test[] testMethod()
11+
12+
13+
14+
### Example
15+
```php
16+
<?php
17+
require_once(__DIR__ . '/vendor/autoload.php');
18+
// Configure HTTP bearer authorization: bearer
19+
$config = Swagger\Client\Configuration::getDefaultConfiguration()
20+
->setAccessToken('YOUR_ACCESS_TOKEN');
21+
22+
23+
$apiInstance = new Swagger\Client\Api\DefaultApi(
24+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
25+
// This is optional, `GuzzleHttp\Client` will be used as default.
26+
new GuzzleHttp\Client(),
27+
$config
28+
);
29+
30+
try {
31+
$result = $apiInstance->testMethod();
32+
print_r($result);
33+
} catch (Exception $e) {
34+
echo 'Exception when calling DefaultApi->testMethod: ', $e->getMessage(), PHP_EOL;
35+
}
36+
?>
37+
```
38+
39+
### Parameters
40+
This endpoint does not need any parameter.
41+
42+
### Return type
43+
44+
[**\Swagger\Client\Model\Test[]**](../Model/Test.md)
45+
46+
### Authorization
47+
48+
[bearer](../../README.md#bearer)
49+
50+
### HTTP request headers
51+
52+
- **Content-Type**: Not defined
53+
- **Accept**: application/json
54+
55+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
56+

0 commit comments

Comments
 (0)