Reputation: 83
I am using ServiceStack Fluent Validation and it works great. I did see an issue.
If my return object name is "xxxxStatusResponse", validation works but I do not see the validation message. If the return object is named as "xxxxStatusResult", I can see the validation message.
Am I missing something here?
Thanks rudrvij
Upvotes: 2
Views: 57
Reputation: 143319
This behavior is documented in ServiceStacks Error Handling docs. If you use the {RequestDtoName}Response
naming convention for the Response DTO ServiceStack will return an instance of that Response DTO, so in order for it to be populated with a structured Error Response it must have a ResponseStatus property, e.g:
public class MyExampleResponse
{
public ResponseStatus ResponseStatus { get; set; }
}
Upvotes: 2