Include the endpoint URI when generating documentation for a route handler #2318
Unanswered
jonathanGB
asked this question in
Questions
Replies: 1 comment
-
This is a little complicated, but |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a binary crate with a Rocket server. I have thoroughly documented the server so that my partner working on the front-end can easily understand what the API is.
As it goes in Rust, I run
cargo doc
, but one thing I have noticed is that the generated HTML does not mention the URI endpoints (see below). For instance, if I have:It would be nice for the screenshot below to mention that the handler is attached to
PUT
requests going to/game/<_>/player/color
.Of course, I could manually write the URI endpoint in the doc comment, but then the comment could become obsolete if I change the actual route, but forget to update the doc comment. Does anyone know about a good way to circumvent this issue? Would it be possible to tell the route macro to generate such documentation?
Beta Was this translation helpful? Give feedback.
All reactions