[Swift] Some fixes for SwiftGenerator for develop 2.0#901
Conversation
|
@tkqubo thanks for the PR. I noticed that you're using "/" as path separator in the generator (java). Please kindly replace "/" with |
|
@wing328 I see, sorry I completely forgot about Windows environment. I fixed that and pushed again. |
|
@tkqubo no problem at all. Thanks for the quick fix. |
There was a problem hiding this comment.
For suppressRequired, would it be better to obtain it from CLI option? Other generators have used the CLI option approach to obtain additional parameter. To pass additional information to the generator, a config.json (or other json config file) needs to be provided.
Let know if you need more information about the CLI option.
There was a problem hiding this comment.
Oh, as you kindly suggested, I found -c option has been added recently.
Thank you I will switch to Config to store some configuration.
There was a problem hiding this comment.
@wing328 Hi, I've updated my pr to fix the issue above
By the way, is it bette to put new commits into a single commit? If so, I will rebase them and push again.
There was a problem hiding this comment.
@tkqubo thanks for the quick turnaround. I'll take another look tomorrow and share with you any feedback I've.
Personally I prefer smaller commits for easier review :)
There was a problem hiding this comment.
I see. I'll squash the commits below 😃
8306a20 to
91af76c
Compare
|
Did a test and code was generated successfully. The CLI option also looks good. |
[Swift] Some fixes for SwiftGenerator for develop 2.0
|
@wing328 Thank you for merging my PR! I will continue to improve swift codegen, though little by little. |
|
@tkqubo thanks again for contribution. Moving forward, we'll try to merge the PR within a week. |
|
Thanks @tkqubo and @wing328! I was just looking into what's changing in the generator and noticed that in APIs.mustache the class name and basePath are specific to someone's project instead of the placeholders. Two other things I was wondering about:
|
|
For 1, there's a PR (#918) to add packaging for ObjC SDKs. I wonder if you can do a test and confirm whether you're looking for something similar in the Swift API client. For 2, you can pass additional option via a JSON file, e.g. Would this help ? |
|
Thanks for the quick response.
This is indeed related, however because of the differences between Swift and Objc and how CocoaPods has to handle them the solution will be different. (CocoaPods with Swift uses frameworks instead of static libraries. And they need explicit access annotations, where in Objc the header files are used)
This is not related, maybe I wasn't clear. What I'm referring to is the code on api.mustache line 11: |
|
@Edubits Thanks for your questions and proposals!
Oh that was a huge mistake! Sorry I have to fix it immediately 😰 And for 1, sorry could you create pull request for this? For 2, I intended to use the class |
|
And @wing328 Thank you so much for your kind explanation! |
No description provided.