Is it possible to document return values with xdata swagger ui

If one tries to execute unauthorized request using swagger ui, it gets exception 401 unauthorized.
and swagger ui show it like this
which should be quite clear, but I had anoying emai exchange with one integrator who told me that he gets undocumented error. I asked him to tell me excact error, he tells be that he gets this undocumented error. I ask him .... and so on and so on. :laughing:
Finally while I was senting him a screensshot I noticed noticed that there is tiny text which says "undocumented". Can I document those somehow ?

That may be possible by using XML documentation with swagger. See the xdata online help.

I have been using xml documentation some time now, but return value doesn't get genereated to swagger.json at all.
This is what get generated from

    /// <summary>
    ///  Why can't one just stay in bed
    /// </summary>
    /// <returns>
    ///   a cleaning task
    /// </returns>
    function dosomething( const where, what: string ): TJSONObject;

responses":{"200":{"description":"Successful response","schema":{"$ref":"#/definitions/System.JSON.TJSONObject"}}}}}

Indeed, for now, XData provides a hardcoded response with status code of 200 (or 204, for procedure). Currently it's not possible to provide custom responses with different status codes.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.