-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Feature: Use gson for android-client instead of jackson #726
Feature: Use gson for android-client instead of jackson #726
Conversation
@who this is awesome. Can we get the tests to pass with the new library? If the tests pass, I'll merge. |
All tests passed on my local fresh checkout, but let's see what Travis CI tells us. |
Great. Thanks again for the contribution |
Which tests were you referring to? The tests run as a part of the maven build of swagger-codegen, which are passing according to Travis CI, or the tests that run after the android-java petstore sample is generated? If you are referring to the latter, I don't think these run in Travis CI at all; as far as I know, the only way to run them is to download the code, run the generator, and observe test output. Here's my script to get a fresh clone and run tests:
And the results:
|
@who unfortunately you need to give a flag to execute the tests (looks like you have them passing) when you build from the top level. If we didn't do that, you'd need xcode, php, etc. all installed just to build. For android, you can run the tests like such:
If you've removed the pom.xml then we should put something in there so maven can execute the child module. |
@fehguy Ahhhhh, ok - that makes sense. The pom was deleted by @0legg in this PR: #699 I'll restore the pom.xml and kick off the tests. In the future we can add a pom plugin for gradle, so we eventually won't need a pom.xml, but for now we should just bring it back so we have integration test capabilities. |
@fehguy Ok, the pom.xml is restored and integration tests are runnable.
|
Great, thank you |
Feature: Use gson for android-client instead of jackson
Reverted JsonUtil.mustache for JavaClientCodegen after PR #726.
As discussed in #687, the generated android client has a high number of methods, which could potentially make it prohibitive to include inside Android apps. One of the proposed changes from #687 was to use gson instead of jackson, which this PR fulfills. With this work, I was able to trim the method counts from 15000-16000 down to ~7600.
I created a fat jar of the petstore android client with and without my modifications, and these are the results I observed: