Adding example value for a controller parameter in Swagger

376 Views Asked by At

I have a .NET Core Web API that I have enabled XML comments on in the program.cs file by calling IncludeXmlComments.

enter image description here

I have the following XML comments set on my controller: XML Comments

But the webpage displays an empty example column:

display of no example

How do I get the Example column to be populated by the example attribute inside the tag?

The XML on my model does update when I change it so I believe this is correctly configured. I cannot get the Example column to hold a value for the controller parameter.

0

There are 0 best solutions below