Open pillowfication opened 11 months ago
Thanks for your interest in kiota and for your suggestion. Yes we could improve the doc comments and the descriptions by including both the summary and the description when they are available. We should probably add a summary field in the description class, switch existing code to this, and then add the description to the description field if it's present as you suggest. Is this something you'd be willing to submit a pull request for?
Some nodes in OpenAPI (e.g. the Path Item Object) can have both a
summary
field and adescription
field. Kiota will always use thedescription
field if it exists, otherwise falling back to thesummary
field as the node's only description. While there seems to be a lot of variance in how these two fields are utilized, it would be nice if they were both retained somehow.https://github.com/microsoft/kiota/blob/9f3c55fca68a0ec94abab7edcde0cc45463a9c67/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs#L142
Current Behavior
A common paradigm is to use
summary
for short descriptions, and additionally add adescription
as a more detailedsummary
OR to supplement the summary with auxiliary details.In this example, the generated docs for
GET /bar
become awkward.Expected Behavior
Ideally I would like both the
summary
anddescription
to be preserved somehow, when they are both present. C# has both the<summary/>
and<remarks/>
tags that can house the two fields.For languages like Java, the two fields can be concatenated.
When only one of
summary
ordescription
is used, the current behavior is fine.