1
我有一個C#Web.API項目與Swagger和Swashbuckle。SwaggerUI不顯示模型綱要
我有一個模型:
public class TimeZoneName
{
public string zoneName { get; }
}
我有方法的控制器:
public string GetLocalTimeByTimeZone(TimeZoneName timezone)
{
//Stuff Happens here
return "12:00";
}
在一個構建我期待Swashbuckle以產生SwaggerUI,顯示TIMEZONENAME類型的JSON表示在UI中。
這沒有發生。
如何設置我的方法和模型,以便模型模式顯示在SwaggerUI中?