Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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
parachutemind wants to merge 2 commits into swagger-api:master
base: master
Choose a base branch
Loading
from parachutemind:fix_issue9655
Open

[Kotlin] Support gson for serialization in addition to moshi #9656

parachutemind wants to merge 2 commits into swagger-api:master from parachutemind:fix_issue9655

Conversation

@parachutemind
Copy link

@parachutemind parachutemind commented Aug 20, 2019

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.sh and ./bin/security/kotlin-client-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\.
    ./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.0 branch 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:

  • 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

mandrizzle, kuFEAR, artur-oganesian, and an22 reacted with thumbs up emoji
Arce, Emilio added 2 commits August 20, 2019 11:30
...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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /