在C# Web Api控制器中,我该如何装饰一个操作的参数,以便在swagger中显示该参数的默认值?
///<example>value </example>
标签。
public class Product { public int Id { get; set; }
///<summary>
///</summary>
///<example>示例值</example>
public string Description { get; set; }
}
2. (Content not provided)对于操作方法中的默认参数值,您可以直接使用如下:
/// <summary>
/// Action Method Summary
/// </summary>
/// <param name="Description">example value</param>