forked from loafle/openapi-generator-original
Merge pull request #1356 from arnested/deserialize-httpHeader
Deserialize httpHeader.
This commit is contained in:
@@ -170,6 +170,13 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams{{#returnType}}, '{{returnType}}'{{/returnType}}
|
$headerParams{{#returnType}}, '{{returnType}}'{{/returnType}}
|
||||||
);
|
);
|
||||||
|
{{#returnType}}
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '{{returnType}}', $httpHeader);
|
||||||
|
{{/returnType}}
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) { {{#responses}}{{#dataType}}
|
switch ($e->getCode()) { {{#responses}}{{#dataType}}
|
||||||
case {{code}}:
|
case {{code}}:
|
||||||
@@ -181,11 +188,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '{{returnType}}');
|
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
}
|
}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
|||||||
@@ -146,6 +146,7 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -210,6 +211,7 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -273,6 +275,13 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\Pet[]'
|
$headerParams, '\Swagger\Client\Model\Pet[]'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -284,11 +293,7 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,6 +351,13 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\Pet[]'
|
$headerParams, '\Swagger\Client\Model\Pet[]'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -357,11 +369,7 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,6 +442,13 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\Pet'
|
$headerParams, '\Swagger\Client\Model\Pet'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -445,11 +460,7 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -523,6 +534,7 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -598,6 +610,7 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -677,6 +690,7 @@ class PetApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ class StoreApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, 'map[string,int]'
|
$headerParams, 'map[string,int]'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, 'map[string,int]', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -156,11 +163,7 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, 'map[string,int]');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,6 +219,13 @@ class StoreApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\Order'
|
$headerParams, '\Swagger\Client\Model\Order'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -227,11 +237,7 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,6 +300,13 @@ class StoreApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\Order'
|
$headerParams, '\Swagger\Client\Model\Order'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -305,11 +318,7 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,6 +381,7 @@ class StoreApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -204,6 +205,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -265,6 +267,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -329,6 +332,13 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, 'string'
|
$headerParams, 'string'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -340,11 +350,7 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, 'string');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,6 +401,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -463,6 +470,13 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams, '\Swagger\Client\Model\User'
|
$headerParams, '\Swagger\Client\Model\User'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$response) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\User', $httpHeader);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
case 200:
|
case 200:
|
||||||
@@ -474,11 +488,7 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$response) {
|
return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\User');
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,6 +556,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
@@ -614,6 +625,7 @@ class UserApi
|
|||||||
$queryParams, $httpBody,
|
$queryParams, $httpBody,
|
||||||
$headerParams
|
$headerParams
|
||||||
);
|
);
|
||||||
|
|
||||||
} catch (ApiException $e) {
|
} catch (ApiException $e) {
|
||||||
switch ($e->getCode()) {
|
switch ($e->getCode()) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user