Skip to content

Commit

Permalink
java, fix: generate builders even when types have no fields (#3744)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcb6 authored May 31, 2024
1 parent 86ed3ea commit e64f3ca
Show file tree
Hide file tree
Showing 19 changed files with 328 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,7 @@ private Optional<BuilderConfig> getBuilderConfig() {
}
}

if (nonRequiredFields.isEmpty() && requiredFields.isEmpty()) {
return Optional.empty();
} else if (requiredFields.isEmpty()) {
if (requiredFields.isEmpty()) {
return Optional.of(DefaultBuilderConfig.builder()
.addAllProperties(objectPropertyWithFields)
.build());
Expand Down
5 changes: 5 additions & 0 deletions generators/java/model/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.8.1] - 2024-05-30

- Fix: Types without fields are now generated with builders. Previously, they were not, which made them impossible to
initialize.

## [0.8.0] - 2024-05-28

- Fix: Undiscriminated unions are now generated with de-conflicted method signatures. Previously, certain
Expand Down
2 changes: 1 addition & 1 deletion generators/java/model/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.0
0.8.1
5 changes: 5 additions & 0 deletions generators/java/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.9.5] - 2024-05-30

- Fix: Types without fields are now generated with builders. Previously, they were not, which made them impossible to
initialize.

## [0.9.4] - 2024-05-28

- Fix: The SDK now generates undiscriminated unions with de-conflicted method signatures. Previously, certain
Expand Down
2 changes: 1 addition & 1 deletion generators/java/sdk/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.4
0.9.5
5 changes: 5 additions & 0 deletions generators/java/spring/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.8.3] - 2024-05-30

- Fix: Types without fields are now generated with builders. Previously, they were not, which made them impossible to
initialize.

## [0.8.2] - 2024-05-28

- Fix: Undiscriminated unions are now generated with de-conflicted method signatures. Previously, certain
Expand Down
2 changes: 1 addition & 1 deletion generators/java/spring/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.2
0.8.3

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

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

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

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

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

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

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

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

Loading

0 comments on commit e64f3ca

Please sign in to comment.