Generation of OpenAPI documentation

0
Hi,   I have a question about generating OpenAPI documentation with Mendix.   I can generate documentation and have it visible in Swagger when I use via message definition generated export and import mappings and use them directly in the Published REST service. But when I use the export mapping directly in the Published REST service I only have two options to either send the object of the export service or not send it. In both case the response to the requesting client is status code 200.    When I use the export mapping in a microflow and use a HttpResponse as return object and can give any status code I want, but I loose the OpenAPI documentation.   I obviously need the ability to return different status codes and message depending on if something goes wrong, but I also would like to have the OpenAPI documentation so that the developers of the client can use it to generate their code.   Anybody has any ideas how to solve this? Is there a solution?   (Mendix version 10.12.7)
asked
1 answers
1

Hi Edo Riemersma,

 

you can add the HttpRequest as Parameter to your microflow and change the object according to your needs (see sample below).

You dont need to define it as parameter in your RestService. It is automatically available by the system.

 

image.png

image.png

 

image.png

image.png

answered