Skip to content

Generate Builder methods on BeansΒ #1160

@cmoine-swi

Description

@cmoine-swi

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.

Metadata

Metadata

Assignees

Labels

area:serverThis item is related to the server extension

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions