aspnetcore-minimal-api icon indicating copy to clipboard operation
aspnetcore-minimal-api copied to clipboard

Question: Have you figured out how to add XML comments to OpenAPI output?

Open Allann opened this issue 3 years ago • 2 comments

I am struggling to find any examples of how to inject descriptions for the endpoint and parameters. This use to be easy because xml comments on classes and properties could be added via swagger.

  • methods (e.g. app.MapPost(... cant have xml comments
  • xml comments on classes used as request/response objects are ignored including the public properties

Any help would be appreciated.

Allann avatar Dec 18 '21 05:12 Allann

Let me get back to you soon.

Thanks

Le sam. 18 déc. 2021 à 00:32, Allan Nielsen @.***> a écrit :

I am struggling to find any examples of how to inject descriptions for the endpoint and parameters. This use to be easy because xml comments on classes and properties could be added via swagger.

  • methods (e.g. app.MapPost(... cant have xml comments
  • xml comments on classes used as request/response objects are ignored including the public properties

Any help would be appreciated.

— Reply to this email directly, view it on GitHub https://github.com/AnthonyGiretti/aspnetcore-minimal-api/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBX2J6Y5UPFZXO5LJOA2T3URQMGPANCNFSM5KKICMYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Anthony Giretti Blogger, Speaker | MVP, MCSD m: +1 514 557 1380 <+1+514+557+1380> s: anthonygiretti.com e: @.

AnthonyGiretti avatar Dec 18 '21 17:12 AnthonyGiretti

Hi,

I have found the answer. This is simply not supported for now. @davidfowl himself precise it here: https://stackoverflow.com/questions/69790435/swagger-asp-net-core-minimal-api-include-xml-comments-files

AnthonyGiretti avatar Dec 20 '21 01:12 AnthonyGiretti