245
Views
7
Comments
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 ?

mvp_badge
MVP

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 ?"...


mvp_badge
MVP

Hi Bob,

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

mvp_badge
MVP

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

I am also facing the similar problem . I want to also add failure meesages into API document. Please help

mvp_badge
MVP

Hi Sandeep,

You are replying to a post that's over three years old. Also, it already clearly states this isn't possible.

I'll close this post now, there's no solution for this problem.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.