Skip to content

Generate Builder methods on Beans #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cmoine-swi opened this issue May 27, 2025 · 0 comments · May be fixed by #1162
Open

Generate Builder methods on Beans #1160

cmoine-swi opened this issue May 27, 2025 · 0 comments · May be fixed by #1162
Assignees
Labels
area:server This item is related to the server extension

Comments

@cmoine-swi
Copy link

cmoine-swi commented May 27, 2025

Tell us the extension to which you'd like to add the feature.

Server

What kind of feature would you like to add?

Generated beans don't have the useful "builder" methods, such as:

Person name(String name) {
  this.name=name;
  return this;
}

This generator is based on Apicurio, which itself based on "jsonschea2pojo" library. This library provides an option to have an equivalent method named withName. It would be great to expose this option.

I can provide a PR if you are interested ;-)

Proposal(s):

Add an option in application.properties:
quarkus.openapi.generator.generate-builders=true
(false by default)

Alternative(s):

No response

Additional info:

No response

Community Notes

  • Please vote by adding a 👍 reaction to the feature to help us prioritize.
  • If you want to work on this feature, please leave a comment.
@cmoine-swi cmoine-swi linked a pull request May 27, 2025 that will close this issue
@hbelmiro hbelmiro linked a pull request May 27, 2025 that will close this issue
@ricardozanini ricardozanini added the area:server This item is related to the server extension label May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:server This item is related to the server extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants