-
Notifications
You must be signed in to change notification settings - Fork 115
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
Route description #3
Comments
That behaviour isn't currently implemented, but it's a good idea - I'll definitely keep it in mind for future enhancements |
I'm not familiar with Proc Macros at all, but I wrote up a POC here: master...leeola:fn-doc-support (because I too needed the feature). That branch generates both a description and the summary from the docstring on a rocket route. @GREsau Let me know if you'd like me to make a PR. There are a couple FIXME's. Note that I'm not immediately making the PR because it was a hastily, uninformed POC and there may be much better ways to implement it. Nevertheless, I figured I'd link my attempt in case it helps anyone. |
Sorry for the slow turnaround, I've just started looking at this. I'm planning on copying schemars's behaviour, so if the first line of the doc comment begins with a # (i.e. if it's a markdown heading), then it will be used as the title (or summary in this case). The rest of the doc comment will be used as the description. |
Done - this is now implemented in rocket_okapi 0.4.1 and published to crates.io |
- Added feature flag for `secrets` (Re-exposing Rocket feature flag) - Added support for Request Guards and Security Scheme (aka Authentication and Authorization) (Closes: #47, #9, #3) - Added support for new `FromRequest` types (implemented `OpenApiFromRequest`). - Added `OpenApiFromRequest` derive macro. - Added `map!` macro for easy creation of `okapi::Map` objects. - Change `OAuthFlows` to better represent the different flows and allowed values within them. - Fixed casing in `SecuritySchemeData`.
- Added feature flag for `secrets` (Re-exposing Rocket feature flag) - Added support for Request Guards and Security Scheme (aka Authentication and Authorization) (Closes: #47, #9, #3) - Added support for new `FromRequest` types (implemented `OpenApiFromRequest`). - Added `OpenApiFromRequest` derive macro. - Added `map!` macro for easy creation of `okapi::Map` objects. - Change `OAuthFlows` to better represent the different flows and allowed values within them. - Fixed casing in `SecuritySchemeData`.
It seems that route docs doesn't currently used to generate route descriptions.
Am I missing anything?
Thanks for the project!
The text was updated successfully, but these errors were encountered: