How to give examples with Swashbuckle in swagger for generics
Chu Xu
21
Reputation points
I have an API that takes generics, eg.
public class ConfigurationDocument<T>
{
/// <summary>
/// Gets or sets the Id of the Configuration document.
/// </summary>
/// <remarks>Id of the Configuration document.</remarks>
/// <example>T-12345678</example>
[JsonProperty(PropertyName = "id", Required = Required.Always)]
public string Id { get; set; }
}
How to make example with real T type, eg. Type1-12345678, Type2-12345678?
Community Center | Not monitored
46,249 questions
Sign in to answer