服务堆栈是否支持 Swagger 中的模型。在下面的示例代码中
[Route("/User", "GET", Summary = "Get all the users available")]
[Route("/User", "POST, PUT", Summary = "Create a new user")]
[Route("/User/{Id}", "GET", Summary = "Get user with a specific id")]
public class User : RequestBase, IReturn<UserResponse>
{
[ApiMember(Name = "Id", Description = "The User Id", ParameterType = "path", DataType = "int", IsRequired = false)]
public int Id { get; set; }
[ApiMember(Name = "UserData", Description = "The User Data", ParameterType = "body", DataType = "complex", IsRequired = false)]
public UserData Entry { get; set; }
}
我希望 UserData 是复杂类型或容器类型。但是,如果我将其定义为其中之一,我在 SwaggerUI 中得到的只是一个文本区域框。我没有得到我在 petstore 在线示例中看到的 Model 和 ModelSchema 链接。