-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parcelizeModels CLI option #1289
Conversation
@absimas Thanks for the PR. Java client generator already supports this option as follows:
Shall we name it consistently using |
I would disagree because parcelize is just an annotation that internally generates parcelable implementation for models. |
Understood there's a slight difference. My intention is to have one single "Parcelable" option to make our life easier (we want to avoid adding too many options if possible) Let's see if @jimschubert @dr4ke616 have opinions on this. |
I understand the need but I think it's important to make the distinction here. |
@absimas I ran some tests and got errors doing
Do I need to update build.gradle to make it work? |
@wing328 as I've said in the PRs description, you need to allow experimental features by adding the following lines to your
|
@absimas actually I did try that (and other "solutions" I found in SO) earlier but no luck:
Do I need to use a newer version of Gradle in order to recognize I'm using Gradle 4.8. |
For future reference: the problem is that the kotlin client doesn't depend on the android's framework which provides the base |
@absimas when you've time, please have a look at the compile issue reported by the CI below:
|
@absimas can you please also run |
If no further feedback/question on this PR, I'll merge it on coming Friday. |
The CircleCI failure is due to outdated generator doc and I'll update after merging this PR into master. |
@absimas thanks for the PR, which has been included in the v3.3.3 release: https://twitter.com/oas_generator/status/1062929948191510528 |
* Add parcelizeModels cli option * Add info log to clarify the parcelization requirements. * Update docs
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.4.x
,4.0.x
. Default:master
.Description of the PR
With cli option
parcelizeModels
(false by default) allow the use of kotlin's parcelize feature which generates all boilerplate automatically. Currently, the user will require to manually setbut it's a small price to pay IMO.
@jimschubert @dr4ke616