swagger-codegen-generators icon indicating copy to clipboard operation
swagger-codegen-generators copied to clipboard

[JAVA] Implement #10176 (for 3.x)

Open michaelkourlas opened this issue 5 years ago • 6 comments

Implemented #10176 (from the swagger-codegen repo) for jersey1, jersey2, resttemplate, and okhttp-gson. Each API call now has up to two additional methods:

  • one containing only required parameters
  • one containing required parameters + optional parameters, the latter in a builder-style format

It was necessary to fix a bug where the body parameter did not appear in the requiredParams list.

michaelkourlas avatar May 04 '20 17:05 michaelkourlas

@HugoMario @frantuma

michaelkourlas avatar Mar 08 '21 15:03 michaelkourlas

@michaelkourlas - Solution looks neat. One of the API that I consume has 10 optional parameters and I had to set null for all of them. Can this be added to the resttemplate type as well?

jayMcoder avatar May 20 '21 08:05 jayMcoder

I'd like the maintainers to confirm whether they're interested in merging this PR before I make any further additions.

michaelkourlas avatar May 20 '21 18:05 michaelkourlas

hey @michaelkourlas thanks for this PR, let me know once is ready to review it and merge it

HugoMario avatar May 20 '21 20:05 HugoMario

@HugoMario I've added support for this pattern for resttemplate as requested, so I believe this PR (as well as this one and this one) are ready to be reviewed.

michaelkourlas avatar May 28 '21 03:05 michaelkourlas

@HugoMario Just notifying you that this PR (as well as this one and this one) are ready to be reviewed.

michaelkourlas avatar Dec 17 '21 14:12 michaelkourlas