The <example> 756 </example> value is not recognized by Swagger UI.
VERSION:
5.6.3
STEPS TO REPRODUCE:
public class SearchQueryViewModel
{
/// <summary> ISO 3166 code of the country where to search (required). </summary>
/// <example> 756 </example>
[Required]
[EnumDataType(typeof(Country), ErrorMessage = "Unknown ISO 3166 country code.")]
public Country Country { get; set; }
Country is an enum:
public enum Country
{
[Description("Andorra")] Ad = 20,
[Description("United Arab Emirates")] Ae = 784,
[Description("Afghanistan")] Af = 4,
EXPECTED RESULT:
Provide a description and example of the expected result
ACTUAL RESULT:
Provide a description of the actual behavior you're observing
(4 is the smallest value of the Country enum.)
The
<example> 756 </example>
value is not recognized by Swagger UI.VERSION:
5.6.3
STEPS TO REPRODUCE:
Country
is an enum:EXPECTED RESULT:
Provide a description and example of the expected result
ACTUAL RESULT:
Provide a description of the actual behavior you're observing (4 is the smallest value of the
Country
enum.)