yonaskolb / SwagGen

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

Add Request encoder #203

Closed yonaskolb closed 4 years ago

yonaskolb commented 4 years ago

This is a followup to #172 It adds a jsonEncoder to APIClient that can be customized. It also hides it behind a RequestEncoder protocol, so other encoders can be used

yonaskolb commented 4 years ago

Any comments @jrcmramos?

jrcmramos commented 4 years ago

Sorry for the delay, but everything looking good! ✨ It makes total sense to me as well the responsibility of the APIClient to inject the encoder to the requests 👍 . This way we also remove the knowledge of the Requests about the API Client (which is at a higher level) .

Nice job!