OpenAPI documentation when result is TJsonObject

Hi,
In some (rare) cases we would like to provide TJsonObject as result. For example when using TDatasnapJsonSerializer. is it possibile to provide manual declaration of result for openapi description.

It is "possible", but not trivial.
You can use the approach described here to hook a code that is executed right after a Swagger document is generated:

Once you do that, you can modify the document as you wish. You would have to manually find the path/url you want to modify and set all the classes accordingly to describe the resulting object.