Yelp / swagger-gradle-codegen

💫 A Gradle Plugin to generate your networking code from Swagger
Apache License 2.0
412 stars 37 forks source link

Initialize optional query parameters with null #145

Closed agologan closed 3 years ago

agologan commented 3 years ago

Pretty self explanatory, helps with calling APIs with many parameters as you don't have to specify all params.

Considered also initialising with default value but that's more like the value the server assigns when a param is missing so I don't think it's wise to pre-initialize it in the client.

codecov[bot] commented 3 years ago

Codecov Report

Merging #145 (6454f3b) into master (54394ee) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #145   +/-   ##
=========================================
  Coverage     71.95%   71.95%           
  Complexity      139      139           
=========================================
  Files            11       11           
  Lines           574      574           
  Branches         75       75           
=========================================
  Hits            413      413           
  Misses          118      118           
  Partials         43       43           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 54394ee...a7ef162. Read the comment docs.

agologan commented 3 years ago

[...] can I ask you to add a test [...] for a call to getSymbolsInParameterName() with no parameters?

done.

cortinico commented 3 years ago

@cortinico will you follow-up with merging (and eventually releasing) this?

Let's merge this. For the releasing part, I'd love to have this into 2.x I'll have some time during the XMas eve to review/develop all the remaining features for 2.x