Is there any way in .Net core to include Example value to parameter of an action method in the Swagger UI. The same way the example value is displayed for response/request.
There doesn't seem any direct way such as SwaggerRequestExample in .Net core so that example value can be displayed for Parameters.
Can someone help me with initial solution or any link with which I can start.
I am looking for output something like below.
This is model object
public class Vehicle
{
public long Id { get; set; }
public string VehicleName { get; set; }
public int Price { get; set; }
}
This is post method
[HttpPost]
public void Post(int id, [FromBody] Vehicle val)
{
}
This would display ID as a parameter but Vehicle model doesn't show up in Parameters list. I want it to display as an example value. I have also configured following in startup file
c.IncludeXmlComments(xmlPath);


