paperclip icon indicating copy to clipboard operation
paperclip copied to clipboard

What to do with tags?

Open wafflespeanut opened this issue 5 years ago • 2 comments

tags are useful for grouping operations for displaying in the UI, but how can we use them for client-side codegen? Also, is there a neat way to generate them in server-side?

wafflespeanut avatar Sep 01 '19 16:09 wafflespeanut

I'm trying out the actix-web plugin on quite a large api and tags would be really useful for grouping in the UI. Our handlers are already grouped into modules and so I think that would be a natural way to produce the grouping, ideally describing the tag with an inner macro attribute (but this doesn't exist yet - https://github.com/rust-lang/rust/issues/54726)

#![api_v2_tag(
    name = "Tag name",
    description = "Tag description",
)]

#[api_v2_operation]
pub async fn handle_1 ...
#[api_v2_operation]
pub async fn handle_2 ...

platy avatar Oct 07 '20 07:10 platy

For actix-web plugin, we have an approach in #219

wafflespeanut avatar Oct 07 '20 07:10 wafflespeanut