Skip to content

[Java okhttp-gson] Add support of file downloading #1226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2015
Merged

[Java okhttp-gson] Add support of file downloading #1226

merged 2 commits into from
Sep 14, 2015

Conversation

xhh
Copy link
Contributor

@xhh xhh commented Sep 13, 2015

  • For endpoints with file response, save file from response body and return it
  • Allow customizing the folder for file downloading via ApiClient#setTempFolderPath

Integration test result of the Petstore sample:

-------------------------------------------------------
 T E S T S
 -------------------------------------------------------
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.client.ApiClientTest
 Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.379 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.client.auth.ApiKeyAuthTest
 Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.client.auth.HttpBasicAuthTest
 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.client.ConfigurationTest
 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.397 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.client.StringUtilTest
 Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.01 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.petstore.test.PetApiTest
 Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.412 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.petstore.test.StoreApiTest
 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.785 sec
 Concurrency config is parallel='methods', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
 Running io.swagger.petstore.test.UserApiTest
 Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.889 sec

 Results :

 Tests run: 34, Failures: 0, Errors: 0, Skipped: 0

 [INFO] ------------------------------------------------------------------------
 [INFO] BUILD SUCCESS
 [INFO] ------------------------------------------------------------------------
 [INFO] Total time: 59.264 s
 [INFO] Finished at: 2015-09-13T21:05:24+08:00
 [INFO] Final Memory: 20M/173M
 [INFO] ------------------------------------------------------------------------

wing328 added a commit that referenced this pull request Sep 14, 2015
[Java okhttp-gson] Add support of file downloading
@wing328 wing328 merged commit 96f4a3a into swagger-api:master Sep 14, 2015
@fehguy fehguy modified the milestone: v2.1.4 Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants