utoipa
utoipa copied to clipboard
Custom tag names for routes.
Route tags/namespaces at the moment are generated by what is provided in handlers
. Might there be a way to specify renames for these tags so that they can be more clear? For example
tags(
(paths = [route::admin::user], name = "Admin", description = "Admin endpoints."),
),
on openapi
for example?
The #[openapi(...)]
is unable to access the tags
attribute of the path operation. Instead at the moment what can be done is to define custom tag
along with the path operation.
#[utoipa::path(
tag = "Admin",
...
)]
Is there a way to sort which order the tags are placed in?
No they will be organized alphabethical order according to the path. Paths with same tag will be grouped together. The paths will be placed to BTreeMap
which will contain order by itself. And also there is no way to sort them in UI. That would require additional JavaScript from the end user but there is no way to provide such unfortunately.
Closing due inactivity.