Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for addtional tags via tags #916

Merged
merged 1 commit into from
May 7, 2024
Merged

Conversation

juhaku
Copy link
Owner

@juhaku juhaku commented May 7, 2024

Add support for additonal tags via tags attribute on utoipa::path macro. All the tags will be appended to the tags will be appended to the tags of the operation. This means that the default tag (the handler function name by default) will be added if not overridden with the tag attribute.

 #[utoipa::path(
    get,
    tag = "some_tag",
    tags = ["addtional tag 1", "another one"]
 )]
 fn handler() {}

Resolves #880, Resolve #792

Add support for additonal tags via `tags` attribute on `utoipa::path`
macro. All the tags will be appended to the tags will be appended to the
tags of the operation. This means that the default tag (the
handler function name by default) will be added if not overridden with
the `tag` attribute.

```rust
 #[utoipa::path(
    get,
    tag = "some_tag",
    tags = ["addtional tag 1", "another one"]
 )]
 fn handler() {}
```
@juhaku juhaku added the enhancement New feature or request label May 7, 2024
@juhaku juhaku merged commit 9f8ebf3 into master May 7, 2024
14 checks passed
@juhaku juhaku deleted the feature-addtional-tags branch May 7, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Allow multiple tags Allow adding extra tags
1 participant