jdisho / Papr

🌁 An Unsplash app for iOS
Apache License 2.0
1.15k stars 150 forks source link

Proposal - Sourcery automatic code generation for boilerplate #68

Open vaderdan opened 5 years ago

vaderdan commented 5 years ago

Hi what do you think about Sourcery (https://github.com/krzysztofzablocki/Sourcery) It generates generates some of the duplicate/boilerplate code for you

I think that model protocols for every model have identical structure and could be removed (moved to autogenerated file) with this See this gist, https://gist.github.com/vaderdan/cfd9ef853f123143e580ec2e3664a8c1 Basicaly it scans for classes that extends Automodel and make protocols with inputs/outputs from them

https://www.caseyliss.com/2017/3/31/the-magic-of-sourcery

jdisho commented 5 years ago

I like the idea! A PR is very welcomed 🎉