forked from loafle/openapi-generator-original
[kotlin-client][kotlin-server] Feature/kotlin data class serial version uid (#4021)
* feat: add companion object to data classes if the implement the interface java.io.Serializable * style: format template file * style: adapt to project's original code style * fix: add missing imports * style: reverted mustache template to original styling * test: generate additional samples for kotlin-springboot-reactive and kotlin-springboot * docs: name full qualified classname of interface java.io.Serializable to prevent confusion with kotlinx.serialization
This commit is contained in:
@@ -31,4 +31,9 @@ data class ApiResponse (
|
||||
)
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,4 +28,9 @@ data class Category (
|
||||
)
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,10 @@ data class Order (
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
|
||||
@@ -44,6 +44,10 @@ data class Pet (
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
|
||||
@@ -28,4 +28,9 @@ data class Tag (
|
||||
)
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,4 +47,9 @@ data class User (
|
||||
)
|
||||
: Serializable
|
||||
|
||||
{
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user