0

Using XML comments and auto discovery with Swashbuckle and Swagger for Web API 2, is it possible to decorate properties in such a way that information about maximum string length is shown in the swagger ui? For example, the below uses 'manual' decoration with an XML comment - is there some other way of configuring the actual max length to appear in the swagger UI?

public class SomeClass
{
    /// <summary>
    /// Invoice number - maximum 15 characters
    /// </summary>
    public string InvoiceNumber {get;set;}
}
Sentinel
  • 3,582
  • 1
  • 30
  • 44

0 Answers0