Skip to content

Commit fdf612f

Browse files
author
Peter Marton Pecosz
committed
Updated docler-labs/api-client-base updated to 3.0.0
1 parent 3a7b0fd commit fdf612f

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.0] - 2020-08-31
8+
### Changed
9+
- docler-labs/api-client-base updated to 3.0.0
10+
### Removed
11+
- Response 'data' key handling from `Response`.
12+
713
## [1.2.0] - 2020-07-30
814
### Changed
915
- docler-labs/api-client-base updated to 2.0.0
@@ -26,4 +32,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2632

2733
## [1.0.0] - 2020-07-09
2834
### Added
29-
- Initial API client generator release
35+
- Initial API client generator release

src/Entity/Response.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ public function __construct(int $statusCode, Field $body = null)
1616

1717
public function getBody(): ?Field
1818
{
19-
$body = $this->body;
20-
if (
21-
$body !== null
22-
&& $body->isObject()
23-
&& count($body->getObjectProperties()) === 1
24-
) {
25-
$first = current($body->getObjectProperties());
26-
if ($first->getName() === self::ROOT_KEY) {
27-
return $first;
28-
}
29-
}
30-
31-
return $body;
19+
return $this->body;
3220
}
3321
}

0 commit comments

Comments
 (0)