larshp / ABAP-Swagger

Expose ABAP REST services with Swagger/openapi spec
MIT License
97 stars 40 forks source link

http status codes in impelementations #37

Open larshp opened 6 years ago

larshp commented 6 years ago

somehow the method implementations should have a possibility to set the http status code?

mAltr commented 6 years ago

Nice idea, but as far as i understood, i could also throw an exception catched by the sicf handler and set the status there?

larshp commented 6 years ago

not sure how that works, can you add an example? I'm sure others can use this, @JohannesKonings

JohannesKonings commented 6 years ago

An example would be great. If I can set the http status code via an exception would be good for me.

xinitrc86 commented 5 years ago

You could deliver an no check exception, zcx_swag_request_failure that imports code and response message. Catch it inside zcl_swag->run and manipulate mi_server->response