This change nothing to all actual users of Swaggen. It add the support of splitting the generated code for SPM user only and only if they want to. This is the first step to remove Alamofire. It allow to run generated code on Linux if you only use the request and model targets. And finally it add dynamic library support when using SPM.
What have been done
This PR is focus to mainly focus to split in SPM the generated code into 4 part:
Client: take an URLRequest and send them
Models: all the generated models and enums
Requests: all the generated request builders - this part generate URLRequest
I needed to onboard new developper to SwagGen development
I needed the dynamic library support for a big project that I work on that use XcodeGen and some module are imported in multiple place so we needed the dynamic library linking in order to making it work
Remarks
I don't think this should be another template because it doesn’t change the main template it make it more flexible.
Point of interest to the reviewer
In order to make everything works I have to make createURLRequest but it worked with Alamofire so I needed to import the relevant part from Alamofire to make it work.
I did copy the Alamofire Timeline file in order to keep the feature.
Todo after review (in order to not clutter the main work of this PR)
we should add support for CI for Linux after this is merged.
This is another try at https://github.com/yonaskolb/SwagGen/pull/225.
TL;DR
This change nothing to all actual users of Swaggen. It add the support of splitting the generated code for SPM user only and only if they want to. This is the first step to remove Alamofire. It allow to run generated code on Linux if you only use the request and model targets. And finally it add dynamic library support when using SPM.
What have been done
This PR is focus to mainly focus to split in SPM the generated code into 4 part:
Why
I did these changes because:
Remarks
I don't think this should be another template because it doesn’t change the main template it make it more flexible.
Point of interest to the reviewer
In order to make everything works I have to make
createURLRequest
but it worked with Alamofire so I needed to import the relevant part from Alamofire to make it work. I did copy the Alamofire Timeline file in order to keep the feature.Todo after review (in order to not clutter the main work of this PR)
I hope it helps.