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

Feature request: Allow customizing tags for generated operations #314

Closed
danxmoran opened this issue May 1, 2019 · 2 comments · Fixed by #316
Closed

Feature request: Allow customizing tags for generated operations #314

danxmoran opened this issue May 1, 2019 · 2 comments · Fixed by #316
Milestone

Comments

@danxmoran
Copy link
Contributor

The models builder currently defaults to using the first segment of an operation's path as its tag. Those tags are used as headings by the Swagger UI to group related routes together. My team follows a pattern of using an /api prefix for everything other than status checks, so we end up with one big block of routes in the UI:
Screen Shot 2019-05-01 at 1 56 46 PM
Ideally, we'd like to be able to override the tags to manually group things ourselves.

I'd be happy to contribute this change, as long as it hasn't been left out for a reason.

@zarthross
Copy link
Member

I agree, you should be able override those tags and as far as I know there isn't a particular reason why, just never added as a feature. I imagine tagging would work similar to the way the description is added.

If you want to contribute a patch, I'll be happy to review it and get it added in.

@zarthross zarthross added this to the v0.19.0 milestone May 2, 2019
@danxmoran
Copy link
Contributor Author

Any preferences on syntax? The convention seems to be:

  • Symbolic operator
  • Extension method on a non-Rho construct, with RhoRoutes on the RHS.
// We have:
description ** route
auth ^^ route

// Add a new?
tags @@ route

... But without the convention, I'd probably add a new method on RouteBuilder:

route.withTags(tags)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants