1

Anyone know a way that you can provide some sample data to show on the metadata page in ServiceStack for your response models?

For this response model

public class GetIncidentResponse
{
    public IEnumerable<Incident> Incidents { get; set; } 
}

I'm getting this on the metadata page

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{}

When I'd like to be able to display something like

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{ "Filter example 1", "Filter example 2"}
Ryan Vice
  • 2,133
  • 3
  • 23
  • 33
  • Avoid using [interfaces in DTO](http://stackoverflow.com/a/10759250/85785). Use a concrete `List` instead. – mythz Feb 27 '14 at 04:10

1 Answers1

1

@mythz comment fixed my problem. Changing the IEnemerable interfaces to IList worked.

Ryan Vice
  • 2,133
  • 3
  • 23
  • 33