Back to Poem

Macro parameters

poem-openapi/src/docs/tags.md

2.0.01.2 KB
Original Source

Define an OpenAPI Tags.

Macro parameters

AttributeDescriptionTypeOptional
rename_allRename all the items according to the given case convention. The possible values are "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE", "kebab-case", "SCREAMING-KEBAB-CASE".stringY

Item parameters

AttributeDescriptionTypeOptional
renameRename the tag namestringY
external_docsSpecify a external resource for extended documentationstringY

Examples

rust
use poem_openapi::Tags;

#[derive(Tags)]
enum ApiTags {
    /// Operations about user
    User,
    /// Operations about pet
    Pet,
}