Using what is described in the article above to set the status code and the OnResponse extensibility point you can to set the response text. Unfortunately, this won't reflect in the swagger documentation though.

With the SetStatusCode you can output another status code rather than 200, but this is done on the web method logic. But, you can only set one output structure for the code 200 explicitly in the web method output. You can only have one output parameter set to send in the body.

I would like something like this:

Another problem, is that because you only set the other status codes in the web method logic, they are not visible in the API documentation. The documentation only shows the status code 200 and the default output structure.

The idea is to also show in the documentation all the status codes that the web method can output and the different structures each one can output, like swagger does.