Swagger UI documentation / response model

Should swagger Ui documentation show documentation for resposene model? Like in this

image

i have documented them to code like this

    {$REGION 'Documentation'}
    /// <value>
    ///   receiptid
    /// </value>
    {$ENDREGION}
    Fid: Integer;
    {$REGION 'Documentation'}
    /// <value>
    ///   date and time of receipt.
    /// </value>
    {$ENDREGION}
    FTimeStamp: TDateTime;
    {$REGION 'Documentation'}
    /// <value>
    ///   accounting date, year 1899 means not given.
    /// </value>
    {$ENDREGION}

servicemethod call documentation is working.

No, it doesn't show it. It looks like it's a limitation of Swagger-UI, though.

I have seen implementations which have documentation also in model like
https://dev.procountor.com/api-reference/
for example go to ledgerreceipts (post)
don't know it it's their own patch of swagger ui.

Actually did some testing / etc and learned that one must simply use summary
image
I Simply wrote the information in documentexplorer to wrong place. this is working example.

  private
    {$REGION 'Documentation'}
    /// <summary>
    ///   summary from TRecipe class private fiels
    /// </summary>
    {$ENDREGION}
    [ Column( 'tuote', [ ], 18 ) ]
    FProduct: nullable< string >;

And one must put documentation to fields - NOT to properties.

Hi Mika,
I'm sorry about the confusion. I remember I had an issue with Swagger UI and documentation of some DTOs, and I thought it was the same case. Thank you for the follow up.

1 Like

Hi Wagner,
no problem. It was actually quite intresting to find out whats going on. And now I know it exactly where to write it.
And this is really nice feature..

1 Like