Typescript Generator Playground
See
typescript-generator
import com.fasterxml.jackson.annotation.JsonSubTypes import com.fasterxml.jackson.annotation.JsonTypeInfo import com.fasterxml.jackson.annotation.JsonTypeName @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class") @JsonSubTypes([ @JsonSubTypes.Type(DieselCar.class), @JsonSubTypes.Type(ElectricCar.class), ]) class Car { public String name } class DieselCar extends Car { public double fuelTankCapacityInLiters } class ElectricCar extends Car { public double batteryCapacityInKWh }
Options
See
reference
.