argo-client-java icon indicating copy to clipboard operation
argo-client-java copied to clipboard

Optional parameters are not optional in method signatures

Open crenshaw-dev opened this issue 4 years ago • 0 comments

WorkflowServiceApi.listWorkflows, for example, requires all parameters even though all but namespace is optional.

This causes several issues:

  1. ugly code, with a bunch of parameters specified for every call
  2. duplication, with parameters specified in multiple places (unless the user abstracts them out)
  3. upgrade difficulty, because otherwise-insignificant method signature changes will break calls
  4. uncertain behavior, because without thoroughly investigating argo-server code, it's unclear what values are the correct defaults

I suspect this is either an OpenAPI-Generator bug or config issue. If I generate a scala client with OpenAPI-Generator's scala-akka plugin, the parameters are Options defaulted to None.

crenshaw-dev avatar Mar 11 '20 19:03 crenshaw-dev