I'm kind of confused with the auto generated oapi3...
# http4k
s
I'm kind of confused with the auto generated oapi3 schema: it seems it derives the json schema from the examples. Yet,
List<T>
ends up as an
Copy code
"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 ?