Hi, great tool!
But unfortunately, there is an issue in the conversion to Kotlin - Just Types.
As you can see in the Kotlin - Just Types conversation (https://app.quicktype.io?share=cOBGvVmpkp0Ota6z7rno)
You do not have the value information as in the Java - "Plain types only" conversation. (https://app.quicktype.io?share=LvTtRA7APM4tiMM2LnKs)
The typescript definition:
export enum CanvasAction {
ADD = 'add',
BRING_TO_FRONT = 'bringtofront',
DELETE = 'delete',
FLIP = 'flip',
INVERT = 'invert',
UNDO = 'undo',
REDO = 'redo',
}
is becoming:
enum class CanvasAction {
Add,
Bringtofront,
Delete,
Flip,
Invert,
Redo,
Undo
}
But it should be:
enum class CanvasAction(private val value: String) {
ADD("add"),
BRINGTOFRONT("bringtofront"),
DELETE("delete"),
FLIP("flip"),
INVERT("invert"),
REDO("redo"),
UNDO("undo");
fun toValue() = value
companion object {
@Throws(IOException::class)
fun forValue(id: String) = values().find { it.value == id }
?: throw IOException("Cannot deserialize CanvasAction")
}
}
Best,
Sven
Hi, great tool!
But unfortunately, there is an issue in the conversion to Kotlin - Just Types.
As you can see in the Kotlin - Just Types conversation (https://app.quicktype.io?share=cOBGvVmpkp0Ota6z7rno)
You do not have the value information as in the Java - "Plain types only" conversation. (https://app.quicktype.io?share=LvTtRA7APM4tiMM2LnKs)
The typescript definition:
is becoming:
But it should be:
Best,
Sven