Skip to content

Commit a4ec290

Browse files
committed
[PHP] Regenerate petstore samples
1 parent 7d6ac31 commit a4ec290

File tree

17 files changed

+91
-150
lines changed

17 files changed

+91
-150
lines changed

samples/client/petstore-security-test/php/SwaggerClient-php/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
44
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

66
- API version: 1.0.0 ' \" =end
7-
- Build date: 2016-06-28T12:21:23.533+08:00
7+
- Build date: 2016-06-30T07:09:53.488+02:00
88
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
99

1010
## Requirements
@@ -71,7 +71,7 @@ try {
7171

7272
## Documentation for API Endpoints
7373

74-
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
74+
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
7575

7676
Class | Method | HTTP request | Description
7777
------------ | ------------- | ------------- | -------------
@@ -86,12 +86,6 @@ Class | Method | HTTP request | Description
8686
## Documentation For Authorization
8787

8888

89-
## api_key
90-
91-
- **Type**: API key
92-
- **API key parameter name**: api_key */ ' " =end
93-
- **Location**: HTTP header
94-
9589
## petstore_auth
9690

9791
- **Type**: OAuth
@@ -101,6 +95,12 @@ Class | Method | HTTP request | Description
10195
- **write:pets**: modify pets in your account */ ' " =end
10296
- **read:pets**: read your pets */ ' " =end
10397

98+
## api_key
99+
100+
- **Type**: API key
101+
- **API key parameter name**: api_key */ ' " =end
102+
- **Location**: HTTP header
103+
104104

105105
## Author
106106

samples/client/petstore-security-test/php/SwaggerClient-php/docs/Api/FakeApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Swagger\Client\FakeApi
22

3-
All URIs are relative to *https://petstore.swagger.io */ ' " =end/v2 */ ' " =end*
3+
All URIs are relative to *https://petstore.swagger.io ' \" =end/v2 ' \" =end*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------

samples/client/petstore-security-test/php/SwaggerClient-php/lib/Api/FakeApi.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(\Swagger\Client\ApiClient $apiClient = null)
7373
{
7474
if ($apiClient == null) {
7575
$apiClient = new ApiClient();
76-
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ ' " =end/v2 */ ' " =end');
76+
$apiClient->getConfig()->setHost('https://petstore.swagger.io ' \" =end/v2 ' \" =end');
7777
}
7878

7979
$this->apiClient = $apiClient;
@@ -161,7 +161,9 @@ public function testCodeInjectEndWithHttpInfo($test_code_inject____end = null)
161161
'PUT',
162162
$queryParams,
163163
$httpBody,
164-
$headerParams
164+
$headerParams,
165+
null,
166+
'/fake'
165167
);
166168

167169
return array(null, $statusCode, $httpHeader);

samples/client/petstore-security-test/php/SwaggerClient-php/lib/ApiClient.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ public function getApiKeyWithPrefix($apiKeyIdentifier)
144144
* @param array $postData parameters to be placed in POST body
145145
* @param array $headerParams parameters to be place in request header
146146
* @param string $responseType expected response type of the endpoint
147+
* @param string $endpointPath path to method endpoint before expanding parameters
147148
*
148149
* @throws \Swagger\Client\ApiException on a non 2xx response
149150
* @return mixed
150151
*/
151-
public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null)
152+
public function callApi($resourcePath, $method, $queryParams, $postData, $headerParams, $responseType = null, $endpointPath = null)
152153
{
153154

154155
$headers = array();

samples/client/petstore-security-test/php/SwaggerClient-php/lib/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Configuration
102102
*
103103
* @var string
104104
*/
105-
protected $host = 'https://petstore.swagger.io */ ' " =end/v2 */ ' " =end';
105+
protected $host = 'https://petstore.swagger.io ' \" =end/v2 ' \" =end';
106106

107107
/**
108108
* Timeout (second) of the HTTP request, by default set to 0, no timeout

samples/client/petstore-security-test/php/SwaggerClient-php/lib/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public static function deserialize($data, $class, $httpHeaders = null, $discrimi
264264
} else {
265265
return null;
266266
}
267-
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
267+
} elseif (in_array($class, array('void', 'bool', 'string', 'double', 'byte', 'mixed', 'integer', 'float', 'int', 'DateTime', 'number', 'boolean', 'object'))) {
268268
settype($data, $class);
269269
return $data;
270270
} elseif ($class === '\SplFileObject') {

samples/client/petstore/php/SwaggerClient-php/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod
44
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

66
- API version: 1.0.0
7-
- Build date: 2016-06-28T14:37:09.979+08:00
7+
- Build date: 2016-06-30T07:09:58.112+02:00
88
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
99

1010
## Requirements
@@ -133,12 +133,6 @@ Class | Method | HTTP request | Description
133133
## Documentation For Authorization
134134

135135

136-
## api_key
137-
138-
- **Type**: API key
139-
- **API key parameter name**: api_key
140-
- **Location**: HTTP header
141-
142136
## petstore_auth
143137

144138
- **Type**: OAuth
@@ -148,6 +142,12 @@ Class | Method | HTTP request | Description
148142
- **write:pets**: modify pets in your account
149143
- **read:pets**: read your pets
150144

145+
## api_key
146+
147+
- **Type**: API key
148+
- **API key parameter name**: api_key
149+
- **Location**: HTTP header
150+
151151

152152
## Author
153153

samples/client/petstore/php/SwaggerClient-php/docs/Model/ArrayTest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
**array_of_string** | **string[]** | | [optional]
77
**array_array_of_integer** | [**int[][]**](array.md) | | [optional]
88
**array_array_of_model** | [**\Swagger\Client\Model\ReadOnlyFirst[][]**](array.md) | | [optional]
9-
**array_of_enum** | **string[]** | | [optional]
109

1110
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1211

samples/client/petstore/php/SwaggerClient-php/docs/Model/MapTest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**map_map_of_string** | [**map[string,map[string,string]]**](map.md) | | [optional]
7-
**map_map_of_enum** | [**map[string,map[string,string]]**](map.md) | | [optional]
87
**map_of_enum_string** | **map[string,string]** | | [optional]
98

109
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

samples/client/petstore/php/SwaggerClient-php/lib/Api/FakeApi.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ public function testCodeInjectEndWithHttpInfo($test_code_inject__end = null)
161161
'PUT',
162162
$queryParams,
163163
$httpBody,
164-
$headerParams
164+
$headerParams,
165+
null,
166+
'/fake'
165167
);
166168

167169
return array(null, $statusCode, $httpHeader);
@@ -357,7 +359,9 @@ public function testEndpointParametersWithHttpInfo($number, $double, $string, $b
357359
'POST',
358360
$queryParams,
359361
$httpBody,
360-
$headerParams
362+
$headerParams,
363+
null,
364+
'/fake'
361365
);
362366

363367
return array(null, $statusCode, $httpHeader);
@@ -440,7 +444,9 @@ public function testEnumQueryParametersWithHttpInfo($enum_query_string = null, $
440444
'GET',
441445
$queryParams,
442446
$httpBody,
443-
$headerParams
447+
$headerParams,
448+
null,
449+
'/fake'
444450
);
445451

446452
return array(null, $statusCode, $httpHeader);

0 commit comments

Comments
 (0)