swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Issue 6504

Open jacobweber opened this issue 7 years ago • 1 comments

PR checklist

  • [X] Read the contribution guidelines.

  • [X] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.

After running this, there were some changes in samples that didn't look like they were related to my change. I only committed the relevant ones.

  • [X] Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.

  • [X] Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @bbdouglas @JFCote @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger

Description of the PR

Similar to issue #6504, but for okhttp-gson.

For path parameters that specify a collectionFormat, the Java code was using toString, which resulted in something like [a,b,c]. I added a method to format this correctly, and called it when formatting the path parameters. I only did it for okhttp-gson, but you could probably do something similar for other libraries.

jacobweber avatar Mar 14 '18 18:03 jacobweber

Hi. Just wondering if there was there some reason this couldn't be merged. This issue #6504 affects all of the Java clients as far as I can tell.

jacobweber avatar Oct 29 '18 16:10 jacobweber