yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
626 stars 146 forks source link

Add support for binary response bodies #244

Closed Hustenbonbon closed 3 years ago

Hustenbonbon commented 4 years ago

This fixes an issue in our project, where we need to be able to have binaries as a response body. If the type equals the OpenAPI type File, we just return the data instead of trying to decode it with a JSON decoder.

This could be a first step to resolve issue #21

yonaskolb commented 3 years ago

Thanks @Hustenbonbon. Could you please add a changelog entry and an example to the test fixture here https://github.com/yonaskolb/SwagGen/blob/master/Specs/TestSpec/spec.yml

yonaskolb commented 3 years ago

There were some issues in master and tests weren't running. Could you please rebase off current master

yonaskolb commented 3 years ago

I've made those changes for you @Hustenbonbon, merging in now for this release. Thanks again!

Hustenbonbon commented 3 years ago

Hey, thanks! I stopped working on a project using openapi unfortunately since the request, and didn't know how to do the testspecs, thanks for using it! Hopefully it will be of use for others and me in the future :-)