mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-04-20 23:07:01 +00:00
add some tests for OpenapiBuilder
This commit is contained in:
parent
101e94b900
commit
f7157dcf62
4 changed files with 82 additions and 11 deletions
|
@ -134,7 +134,12 @@ fn main()
|
|||
);
|
||||
|
||||
gotham::start(ADDR, build_router(chain, pipelines, |route| {
|
||||
route.with_openapi("Users Example".to_owned(), "0.0.1".to_owned(), format!("http://{}", ADDR), |mut route| {
|
||||
let info = OpenapiInfo {
|
||||
title: "Users Example".to_owned(),
|
||||
version: "0.0.1".to_owned(),
|
||||
urls: vec![format!("http://{}", ADDR)]
|
||||
};
|
||||
route.with_openapi(info, |mut route| {
|
||||
route.resource::<Users>("users");
|
||||
route.resource::<Auth>("auth");
|
||||
route.get_openapi("openapi");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue