Skip to content
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

[Swift3] Download a binary file does not write that file to disk or return the bytes. #6236

Closed
dwoodel opened this issue Aug 4, 2017 · 2 comments

Comments

@dwoodel
Copy link
Contributor

dwoodel commented Aug 4, 2017

Description

[Swift3] Download a binary file does not write that file to disk or return the bytes. When using the scheme: file in the open API Spec, an error is returned. There does not seem to be any support for returning a file or byte[].

Swagger-codegen version

Swift 3 Generator, with Alamofire - CodeGen Version 2.2.3. Open API Spec 2.0

Swagger declaration file content or url

https://gist.github.com/dwoodel/d160a3e792a23681719925e276825d8a

Command line used for generation

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate --input-spec ../swagger.json --lang swift3 --output ../gen

Steps to reproduce

Generate the swift3 code. Attempt to download the file from this end point using the generated API. The file is downloaded, however an error is returned. This error happens to contain the bytes for the file. The method should return a URL to the local file.

Related issues/PRs

No related issues that I can find.

Suggest a fix/enhancement

We have fixed this locally, we will raise a PR shortly. We download the file to disk and return a URL to that file.

CC @wuf810

@dwoodel
Copy link
Contributor Author

dwoodel commented Aug 7, 2017

We have a PR for this fix, if you guys wanna accept it.

@wuf810
Copy link
Contributor

wuf810 commented Aug 8, 2017

@wing328 I'm ready to create a PR for this issue.

@wing328 wing328 added this to the v2.3.0 milestone Aug 8, 2017
@dwoodel dwoodel mentioned this issue Aug 9, 2017
3 tasks
@wing328 wing328 closed this as completed Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants