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 documenting routers #24

Open
aidansunbury opened this issue Nov 16, 2024 · 0 comments
Open

Add support for documenting routers #24

aidansunbury opened this issue Nov 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@aidansunbury
Copy link
Owner

This feature might be something only I am interested in, but I like the idea of being able to document information about the "object" that is grouping procedures.

The stripe api does this frequently. The swagger spec also supports tags having descriptions.

Screenshot 2024-11-15 at 5 50 44 PM

For an equivalent "pets" router, we should be able to specify that it is a router that is all about your pets.

Implementation

As far as I can tell, trpc does not support router metadata. The hacky way to do this would be to merge your base t.procedure with another router that just contains a dummy procedure to store the metadata.

Screenshot 2024-11-15 at 5 55 00 PM

@aidansunbury aidansunbury added the enhancement New feature or request label Nov 16, 2024
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
None yet
Development

No branches or pull requests

1 participant