Senior Tutor

Re: Java SDK

Thanks David, sure here are some details for #1.

 

Create the client as (using v 2.3.1 codegen-cli):

 

java -jar swagger-codegen-cli.jar generate -i https://www.zuora.com/wp-content/themes/zuora/yaml/swagger.yaml -l java -o z-api --library resttemplate

 

Now looking in the generated classes if you look at say OAuthApi, there is only one method with the signature:

createToken(String clientId, String clientSecret, String grantType, String zuoraTrackId)

This makes zuoraTrackId a required param so I must provide it even though it is optional in the spec.

 

Not so bad in this case but when there are tens of optional fields and I'm forced to provide all of them then its practically not very usable. Maybe I am missing some configuration for codegen as I would expect optional fields in spec are not required.