[英]Swagger UI Description
/// <summary>
/// This method will retrieve a company in portal
/// </summary>
/// <param name="UserName">This is the Username assigned to a company to allow service procesing</param>
/// <param name="ActualCompanyName">Actual Name of the company</param>
/// <returns>This returns a PortalCompany object <see cref="PortalCompany"/> upon successful completion. If a failure arises it will return <see cref="SiteAccessException"/> object. The restful nodes will return</returns>
[OperationContract]
[WebInvoke(Method = "GET",
UriTemplate = "GetCompany/{UserName}/{ActualCompanyName}")]
[SwaggerWcf.Attributes.SwaggerWcfPath("Get Company", "Get Company to the portal")]
PortalCompany GetCompany(String UserName, String ActualCompanyName);
Here's My Operation Contract. 这是我的运营合同。 I need to View the Description in this section. 我需要在本节中查看说明。 See Image for reference where it should appear. 请参阅图像以获取应出现的位置的参考。
You are looking for description of parameters, not the end-point one. 您正在寻找参数的描述,而不是终点。
If you need to show the description on any DataContract
property, your should add DescriptionAttribute
on them: 如果需要在任何DataContract
属性上显示说明,则应在其上添加DescriptionAttribute
:
[DataContract(Name = "book")]
public class MyContract
{
[DataMember(Name = "UserName")]
[Description("Name of the user")]
public string UserName{ get; set; }
// [.......]
}
You should take a look at the documentation for better undestanding of those parameters: SwaggerWcf 您应该看一下文档,以更好地理解这些参数: SwaggerWcf
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.