Hello
I am trying to convert some old rest classes using the OpenApi spec (e.g. %REST.Impl)
Say I want to return a 401 in my impl.cls for api and I can define the status code as follows, e.g.
Do ..%SetStatusCode("401")
Do ..%SetContentType("application/json")However the api client will see this as 401 OK which is not right.
In the past, I could just create a rest class that extends from %CSP.REST and return as follows:
Set%response.Status = ..#HTTP401UNAUTHORIZEDThis will return 401 Unauthorized, which what I expect to see reported in the api client.