Ryan Vice
Ryan Vice

Reputation: 2181

Providing Response Model sample JSON data on the metadata page in ServiceStack

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"}

Upvotes: 1

Views: 58

Answers (1)

Ryan Vice
Ryan Vice

Reputation: 2181

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

Upvotes: 1

Related Questions