Right now the types in Worker metadata do not include names. Meaning that recursive definitions are not supported.
To be able to display the wit definitions in full, the names should be included in the following type.
com.golem.component.Model.Type
enum Type {
// other types...
case Record(fields: Chunk[(String, Type)])
case Flags(names: NonEmptyChunk[String])
case Enum(names: NonEmptyChunk[String])
case Variant(cases: NonEmptyChunk[(String, scala.Option[Type])])
}
maybe another case is necessary like "reference", so that definitions could refer to themselves or other types that are embedded.
case Reference(name: String)