I added a recursive response type the other day for a tree view type of service. Something simple like
class Node : IHasGuidId {
public Guid Id {get;set;}
public string Text {get;set;}
public Node[] Children {get;set;}
}
And found out that type generation for typescript (and presumably others) broke. SS fell into an infinite loop here: https://github.com/ServiceStack/ServiceStack/blob/1036956603d1288ec908aca6f8720a2c352b2a73/src/ServiceStack/NativeTypes/NativeTypesMetadata.cs#L187
The property type info just keeps getting added to the queue over and over on line #173
Something simple like
if (!considered.Contains(t))
{
considered.Add(t);
queue.Enqueue(t);
}
Would fix it from what I see but I’m no expert here