-
Notifications
You must be signed in to change notification settings - Fork 6k
[Kotlin] Support gson for serialization in addition to moshi #9656
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
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
...client) #9655 I would like to use gson serialization engine in kotlin-client generated code. Summary of changes: - Added a new 'serializationEngine' option for config.json with 2 valid values: "moshi" (default) and "gson" - updated to kotlin-client mustache templates to support gson's @SerializedName annotation - this also helps with proguard which can break JSON binding to object in release code - removed empty {} in the data class body when there is no enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #9655
PR checklist
[x ] Read the contribution guidelines.
[ x] Ran the shell script under
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/kotlin-client-petstore.shand./bin/security/kotlin-client-petstore.shif 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\../bin/security/kotlin-client-petstore.sh
./bin/security/kotlin-client-petstore.sh -DserializationEngine=foo --> generated the right error message
./bin/security/kotlin-client-petstore.sh -DserializationEngine=gson
[x ] Filed the PR against the correct branch:
3.0.0branch for changes related to OpenAPI spec 3.0. Default:master.[could not find Kotlin committee name ] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.
Description of the PR
I would like to use gson serialization engine in kotlin-client generated code.
Summary of changes: