Skip to content

Conversation

@fkischewski99
Copy link
Contributor

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to our code style
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Subject
  • Pull Request contains link to the issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket

Enables the generator to initialize collections as an empty collection instead of null

this PR fixes #734

  1. Introducing a new configuration property initialize-empty-collections, wich defaults to false
  2. When parameter is set, collections will be initialized as an empty set or an empty list, instead of null

@fkischewski99 fkischewski99 requested a review from a team as a code owner May 5, 2025 12:16
Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM. Just please take a look at the CI errors.

@ricardozanini ricardozanini requested review from hbelmiro and mcruzdev May 5, 2025 13:21
@ricardozanini ricardozanini added area:client This item is related to the client extension backport-main-lts labels May 5, 2025
@ricardozanini ricardozanini merged commit bf04196 into quarkiverse:main May 6, 2025
7 checks passed
github-actions bot pushed a commit that referenced this pull request May 6, 2025
* Add initialize empty collection parameter

* Fixed wrong spec name and wrong import in initialize-empty-collection test

---------

Co-authored-by: Sebastian Brune <[email protected]>
Co-authored-by: Frederik Kischewski <[email protected]>
hbelmiro added a commit that referenced this pull request May 13, 2025
* Add initialize empty collection parameter (#1129)

* Add initialize empty collection parameter

* Fixed wrong spec name and wrong import in initialize-empty-collection test

---------

Co-authored-by: Sebastian Brune <[email protected]>
Co-authored-by: Frederik Kischewski <[email protected]>

* Update client/integration-tests/initialize-empty-collections/pom.xml

Co-authored-by: Frederik Kischewski <[email protected]>

---------

Co-authored-by: fkischewski99 <[email protected]>
Co-authored-by: Sebastian Brune <[email protected]>
Co-authored-by: Frederik Kischewski <[email protected]>
Co-authored-by: Helber Belmiro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:client This item is related to the client extension backport-main-lts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Init empty collections in generated model

4 participants