How to mark api parameter as optional for Swagger UI for Web API 2?
问题 I am using Swagger for WebApi 5.5.3 nuget package for API documentation. In swagger UI it is showing required option for optional parameter. I tried XML comment option in Visual studio. Below is the API method that i want to document: /// <summary> /// Gets the history. /// </summary> /// <param name="currentPageIndex">Index of the current page.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="lastSyncDate">The last synchronize date.</param> /// <returns></returns