-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
[kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable #3997
[kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable #3997
Conversation
…rializable, by adding the config option serializableModel=(true|false)
FYI. I've added the new option via 15e433e and update the doc, samples, etc. |
… classes that implement java.io.Serializable (OpenAPITools#3997) * feat: allow creation of kotlin data classes that implement java.io.Serializable, by adding the config option serializableModel=(true|false) * docs: add markdown docu for new configOption serializableModel * fix: do not use parcelize in script * update kotlin samples * add the option, update the doc
@janweinschenker thanks for the PR, which has been included in the v4.1.3 release: https://twitter.com/oas_generator/status/1180123829626003456 |
You’re welcome! Thx for accepting it. |
I've tried adding
|
…rializable, by adding the config option serializableModel=(true|false)
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{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\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
I added a new configOption "serializableModel=(true|false)" to org.openapitools.codegen.languages.AbstractKotlinCodegen and to the files
in order to allow to generate kotlin data classes that implement the interface "java.io.Serializable". This will come in handy if data classes are generated with the intention to store data in databases or in distributed caches (i.e. hazelcast)