I’ve got a simple DTO:
[Route("/articles")]
[Route("/articles/{Id}")]
public class QueryArticles : IReturn<QueryArticlesResponse>
{
public string Id { get; set; }
[Input(Type = "textarea")]
public Condition TagConditions { get; set; }
}
Where Condition is a custom class:
public class Condition
{
public string RequireKeyword { get; set; }
public string DisallowKeyword { get; set; }
[Input(Type = "textarea")] // just a test, didn't help
public List<Condition> Or { get; set; }
[Input(Type = "textarea")] // just a test, didn't help
public List<Condition> And { get; set; }
}
When I open API Explorer, the only form field I can input is the ID. To send anything for the Condition, I have to edit using the JSON-tab, however entering this into the JSON input field:
{
"id": "1",
"tagConditions":{"requireKeyword":"test"}
}
ServiceStack will just stay there and hang. Inspecting the network traffic reveals this is sent as the query parameters:
id=1&tagConditions=%5Bobject%20Object%5D
Worth noting:
Using PostMan, issuing a GET request with the raw body
{
"tagConditions":{
"or":[
{"requireKeyword":"Page/Country/SE"},
{"requireKeyword":"Page/Country/"}
]
}
}
Works perfectly. The “tagConditions” are deserialilzed perfectly.
I’d just like to work through SS ApiExplorer as well.