Flagged enum in Swagger-UI and Servicestack-UI

Hi,

I am using a flagged enum as a filter in my service like so:

[Route("/myroute/", "GET", Summary = "Retrieve a list of something.")]
public class MySearchRequest : IReturn<MySearchResponse>
{
    public MyFlaggedEnum MyFlaggedEnum { get; set; }
}


[Flags]
public enum MyFlaggedEnum
{
    Value1,
    Value2
}

The enum values are shown as dropdown in Swagger-UI and the ServiceStack-UI.

How is it possible to select multiple enum values in the UI?

greetings
Andre

Not possible as an Enum, you can change the property to an int, or in the built-in /ui/ (i.e. API Explorer) you should be able to force it use an [Input] attribute with:

public class MySearchRequest : IReturn<MySearchResponse>
{
    [Input(Type="number")]
    public MyFlaggedEnum MyFlaggedEnum { get; set; }
}

Where you should be able to provide the integer value of the combined enum values, but you’d lose the enum values dropdown.