mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 06:54:46 +00:00
doctest fix #26
This commit is contained in:
parent
604494651d
commit
4ff5a8d7e4
3 changed files with 15 additions and 7 deletions
|
@ -21,9 +21,10 @@ This return type can be used to map another `ResourceResult` that can only be re
|
|||
client is authenticated. Otherwise, an empty _403 Forbidden_ response will be issued. Use can
|
||||
look something like this (assuming the `auth` feature is enabled):
|
||||
|
||||
```
|
||||
```rust
|
||||
# #[cfg(feature = "auth")]
|
||||
# mod auth_feature_enabled {
|
||||
# #[macro_use] extern crate gotham_restful_derive;
|
||||
# mod doc_tests_are_broken {
|
||||
# use gotham::state::State;
|
||||
# use gotham_restful::*;
|
||||
# use serde::Deserialize;
|
||||
|
@ -81,8 +82,9 @@ client is authenticated. Otherwise, an empty _403 Forbidden_ response will be is
|
|||
look something like this (assuming the `auth` feature is enabled):
|
||||
|
||||
```
|
||||
# #[cfg(feature = "auth")]
|
||||
# mod auth_feature_enabled {
|
||||
# #[macro_use] extern crate gotham_restful_derive;
|
||||
# mod doc_tests_are_broken {
|
||||
# use gotham::state::State;
|
||||
# use gotham_restful::*;
|
||||
# use serde::Deserialize;
|
||||
|
|
|
@ -29,7 +29,7 @@ Usage example:
|
|||
# struct MyResource;
|
||||
#
|
||||
#[derive(Deserialize, Serialize)]
|
||||
# #[derive(OpenapiType)]
|
||||
# #[cfg_attr(feature = "openapi", derive(OpenapiType))]
|
||||
struct MyResponse {
|
||||
message: &'static str
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue