Exposed REST API Documentation

Exposed REST API Documentation

  

I change the HTTP Status with SetStatusCode.

Following this document I expect this new Status to appear in the generated documentation.  But it doesn't...  :-(

How do I get new StatusCodes in the exposed REST API documentation ?

Hi Bob,

SetStatusCode is an Action that you call on run time, and that you can give any value you like, including from variables or an Expression. How on earth could the Platform generating the documentation know that a) you even set the status code and b) what that status code is going to be?

That's right...  But my question was "How do I get new StatusCodes in the exposed REST API documentation ?"...


Hi Bob,

I don't think you can. Perhaps this is a good one to create an Idea for. You'd have my vote :).

I think the idea is slightly different, as André explicitly says "Unfortunately, this won't reflect in the swagger documentation though."