Closed
Description
components:
schemas:
Pet:
allOf:
- $ref: '#/components/schemas/NewPet'
- type: object
required:
- id
properties:
id:
type: integer
format: int64
NewPet:
type: object
required:
- name
properties:
name:
type: string
tag:
type: string
The above spec generates:
data class NewPet (
@SerializedName("name")
val name: kotlin.String,
@SerializedName("type")
val type: kotlin.String,
)
data class Pet (
@SerializedName("id")
val id: kotlin.Int
) : Pet
In Kotlin it's impossible for a data class to extend a data class.