2016-12-16 111 views
0
/// <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); 

这是我的操作合同。我需要查看本节中的说明。请参阅图片以供参考。Swagger UI说明

Swagger UI

回答

0

您正在寻找的参数说明,而不是终点之一。

如果需要显示在任何DataContract物业的描述,你应该将它们添加DescriptionAttribute

[DataContract(Name = "book")] 
public class MyContract 
{ 
    [DataMember(Name = "UserName")] 
    [Description("Name of the user")] 
    public string UserName{ get; set; } 

    // [.......] 
} 

你应该看一看的文档,这些参数的更好undestanding:SwaggerWcf

+0

谢谢你这么多。如果价值是否需要呢? – Athan

+0

@不然,在涵盖必填字段的文档中有一个例子 – Fals

+0

谢谢。是的,实际上已经做到了男人,干杯。请多多关注。如何将文本框内的“必需”标签更改为“可选”,例如? – Athan