File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7+ ## [ 0.4.50] - 2022-04-28
8+
9+ ### Fixed
10+
11+ - Exhaustive boolean values elision in const block
12+
713## [ 0.4.49] - 2022-04-28
814
915### Fixed
@@ -288,6 +294,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
288294### Fixed
289295- Removed unnecessary regexp dependency, #7 .
290296
297+ [ 0.4.50 ] : https://github.com/swaggest/go-code-builder/compare/v0.4.49...v0.4.50
291298[ 0.4.49 ] : https://github.com/swaggest/go-code-builder/compare/v0.4.48...v0.4.49
292299[ 0.4.48 ] : https://github.com/swaggest/go-code-builder/compare/v0.4.47...v0.4.48
293300[ 0.4.47 ] : https://github.com/swaggest/go-code-builder/compare/v0.4.46...v0.4.47
Original file line number Diff line number Diff line change @@ -658,6 +658,11 @@ private function processEnum(NamedType $baseType)
658658 $ enumSchemas = null ;
659659 }
660660
661+ if ($ enum !== null && count ($ enum ) === 2
662+ && $ this ->schema ->type === Schema::BOOLEAN ) {
663+ return $ baseType ;
664+ }
665+
661666 if ($ enum !== null ) {
662667 if ($ this ->goBuilder ->options ->hideConstProperties && count ($ enum ) === 1 ) {
663668 return $ baseType ;
You can’t perform that action at this time.
0 commit comments