Stefan
07/21/2021, 3:23 PMList<T>
ends up as an
"schema": {
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/T"
}
]
}
Diving into the impl. indicates, that kotlin lack of coproduct types (`List<T v U>`/ List<Either<T,U>>
) is imitated with examples of T & U. This means a), that if I return an ADT, e.g. Tree = Leaf | Node
, I need to specify Leaf
and Node
as examples? b) even for a final T
a List<T>
always ends up as oneOf T ?