When using a DTO that contains a complex type (another DTO), API Explorer fails to render anything. After this point, other routes fail to render also using the API Explorer.
DTO(s):
public class Bill
{
virtual public string BillID { get; set; }
virtual public string BillNo { get; set; }
virtual public string Description { get; set; }
virtual public Nullable<bool> IsEnabled { get; set; }
virtual public Nullable<decimal> MaximumProductionCapability { get; set; }
virtual public Nullable<System.DateTime> LastSavedDateTime { get; set; }
virtual public byte[] RowHash { get; set; }
virtual public ProductionLine ProductionLine { get; set; } = new ProductionLine();
}
>
public class ProductionLine
{
virtual public string ProductionLineID { get; set; }
virtual public string Name { get; set; }
virtual public string Description { get; set; }
virtual public Nullable<bool> IsEnabled { get; set; }
}
Screenshot of the issue:
VS2022 project demonstrating the issue (visit the BillPOSTRequest route at http://localhost:8088/ui/BillPOSTRequest):
https://github.com/Scott31337/SSTest
EDIT:
The issue does not seem to occur “when a DTO contains another DTO”. It does occur for this specific example, however. There must be something special about these DTOs that is causing something in API Explorer to fall over but I cannot isolate it.