[Swift3] Cleaner template of client methods#4552
Merged
wing328 merged 3 commits intoswagger-api:masterfrom Jan 15, 2017
Merged
Conversation
Contributor
|
@tomekc thanks for the PR. Please run |
Contributor
Author
|
@wing328 It is updated, I forgot BTW Travis checks failed for no reason, and it fixed itself after just updating the PR. I hope it will succeed this time... |
Contributor
|
@tomekc when I ran the integration test for Swift 3 (default), I got the following errors: Did you get similar error when running the test locally? (I ran the same test for swift 3 (default) in master and the tests completed without issue) |
Contributor
Author
|
Result: |
Contributor
|
+1 @wing328 |
Contributor
|
I did another clone and got good test results: |
davidgri
pushed a commit
to davidgri/swagger-codegen
that referenced
this pull request
May 11, 2017
* Swift3 template properly uploads files, making mustache template little cleaner * [swift3] moved URL parameter encoder helper function to APIHelper.swift * Swift3 - regenerated sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR
Fixed an error which in some cases could lead to generate improper API function, for example not uploading files.
Done a little makeover of
api.mustache. Limited capabilities of mustache templates led to extremely convoluted and hardly comprehensible templates.The template has been reformatted a little, added a couple of newlines, as I believe that readibility of template is much more important than resulting code having a couple extra newlines.
I tested on following use-cases, created privately against httpbin.org: