conjure-java
conjure-java copied to clipboard
Generate no-arg static constructor for union type of empty value
What happened?
Given the definition:
NoneType:
fields: {}
SomeType:
fields:
val: any
MyUnion:
union:
none: NoneType
some: SomeType
I want to be able to write MyUnion.none() instead of MyUnion.none(NoneType.of())
I've found it common to have "empty types" as part of a union
Better yet, MyUnion.some("value")
Or builders, MyUnion.some().value("value").build()