Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
vearutop committed Jul 22, 2021
2 parents 715960b + bf7f1c1 commit 515b2f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.26] - 2021-07-22

### Fixed
- Missing response decoding due to exception during code generation for enum, [#31](https://github.com/swaggest/swac/issues/31).

### Added
- Dependencies updated.

## [0.1.25] - 2021-07-16

### Added
Expand Down Expand Up @@ -165,6 +173,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Keep path parameters in operation name of PHP client.

[0.1.26]: https://github.com/swaggest/swac/compare/v0.1.25...v0.1.26
[0.1.25]: https://github.com/swaggest/swac/compare/v0.1.24...v0.1.25
[0.1.24]: https://github.com/swaggest/swac/compare/v0.1.23...v0.1.24
[0.1.23]: https://github.com/swaggest/swac/compare/v0.1.22...v0.1.23
[0.1.22]: https://github.com/swaggest/swac/compare/v0.1.21...v0.1.22
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"swaggest/json-schema": "^0.12.36",
"swaggest/php-code-builder": "^0.2.33",
"swaggest/php-code-builder": "^0.2.34",
"swaggest/go-code-builder": "^0.4.45",
"swaggest/json-cli": "v1.8.5",
"php-yaoi/php-yaoi": "^1",
Expand Down
15 changes: 8 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/Php/Client/Template/Response/ResponseCodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

use Exception;
use GuzzleHttp\Exception\GuzzleException;
use Swac\Log;
use Swac\Rest\Response;
use Swac\Skip;
use Swaggest\CodeBuilder\PlaceholderString;
use Swaggest\JsonSchema\InvalidValue;
use Swaggest\JsonSchema\Schema;
Expand Down Expand Up @@ -143,7 +143,7 @@ public function build()
$binds[':statusCode'] = new TypeOf(PhpClass::byFQN(StatusCode::class));
$codeName = $statusCode->phrase;
} catch (Exception $e) {

throw new Skip($e->getMessage());
}
}

Expand All @@ -162,7 +162,7 @@ public function build()
$case . ': $result = :type::import($this->getJsonResponse());break;' . "\n", $binds
));
} catch (Exception $e) {
Log::getInstance()->error($e->getMessage());
throw new Skip($e->getMessage());
}
} else {
$body->addSnippet(new PlaceholderString(
Expand Down

0 comments on commit 515b2f7

Please sign in to comment.