palantir/conjure-python

FR: Add support for default arguments for list/set query parameters

dtobin opened this issue · 0 comments

What happened?

In the Conjure wire spec, it is backwards compatible to add a query parameter of type list<T> or set<T>, since lists are implicitly empty if not provided. Adding a list/set query parameter is not backwards compatible in the generated Python services however, since the parameter will be required on the service method.

What did you want to happen?

Add a flag useQueryParameterDefaultArguments (or make this behavior the default if the generated code changes are entirely backwards compatible) to add a default argument of an empty list/set in the generated service classes for a query parameter of type list<T> or set<T>.

The same should apply for optional query/header parameters.