Swagger UI Web Api documentation Present enums as strings?

Enable globally From the docs: httpConfiguration .EnableSwagger(c => { c.SingleApiVersion(“v1”, “A title for your API”); c.DescribeAllEnumsAsStrings(); // this will do the trick }); Enum/string conversion on particular property Also, if you want this behavior only on a particular type and property, use the StringEnumConverter: public class Letter { [Required] public string Content {get; set;} [Required] … Read more

How to export swagger.json (or yaml)

The URL of the API definiton is displayed in the top bar of Swagger UI – in your example it’s /v2/api-docs?group=full-petstore-api So the full URL appears to be http://localhost:8080/v2/api-docs?group=full-petstore-api In newer versions of Swagger UI, the link to the API definition is often displayed below the API title, so you can right-click the link and … Read more