utoipa icon indicating copy to clipboard operation
utoipa copied to clipboard

Add support for overriding description (and summary) for `path` and `ToSchema` macros

Open clechasseur opened this issue 7 months ago • 1 comments

utoipa derive macros as well as #[utoipa::path] use doc comments for OpenAPI description (and, in the case of path, also summary). For IntoResponses and ToResponse, it is possible to override this via a description attribute, but not for others.

I would suggest adding support for such a description (and summary) overrides for two other macros:

(It could also be possible to override field-level descriptions, although I see this as less useful personally.)

I volunteer to submit a PR for this if this is deemed an acceptable feature.

(This references #781 and #439; I wanted to open a fresh new issue since I volunteer, so that it has its own tracking issue.)

clechasseur avatar Nov 15 '23 06:11 clechasseur