2016-12-16 82 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