Some of our users have found it misleading that default arguments are always set to 'DEFAULT'. Also some of our endpoints do use default arguments and it would be nice to be able to include that in the signature if specified in the swagger.
This PR uses that default value if present in the swagger, if not it uses the previous 'DEFAULT' string because not setting a default for kwargs will cause the signature to read it as required.
here is an example with our sdkclient.weights.list() method which takes some optional arguments to filter by.
Before (all set to 'DEFAULT'):
Some of our users have found it misleading that default arguments are always set to 'DEFAULT'. Also some of our endpoints do use default arguments and it would be nice to be able to include that in the signature if specified in the swagger.
The 'default' property is included as swagger 2.0 format as optional (https://swagger.io/docs/specification/2-0/describing-parameters/), but it was not being read-in as part of the civis-python parsing process.
This PR uses that default value if present in the swagger, if not it uses the previous 'DEFAULT' string because not setting a default for kwargs will cause the signature to read it as required.
here is an example with our sdkclient.weights.list() method which takes some optional arguments to filter by. Before (all set to 'DEFAULT'):
After (real default values where specified):