diff --git a/example/Cargo.toml b/example/Cargo.toml index 022a647..af55bfa 100644 --- a/example/Cargo.toml +++ b/example/Cargo.toml @@ -18,11 +18,6 @@ fake = "2.2" gotham = { git = "https://github.com/gotham-rs/gotham", version = "0.5.0-dev", default-features = false } gotham_derive = { git = "https://github.com/gotham-rs/gotham", version = "0.5.0-dev", default-features = false } gotham_restful = { version = "0.0.5-dev", features = ["auth", "openapi"] } -log = "0.4" -log4rs = { version = "0.8", features = ["console_appender"], default-features = false } -serde = "1" - -[dev-dependencies] -fake = "2.2" -log = "0.4" -log4rs = { version = "0.8", features = ["console_appender"], default-features = false } +log = "0.4.8" +log4rs = { version = "0.11", features = ["console_appender"], default-features = false } +serde = "1.0.106" diff --git a/gotham_restful/Cargo.toml b/gotham_restful/Cargo.toml index 6b41c39..bb9bd45 100644 --- a/gotham_restful/Cargo.toml +++ b/gotham_restful/Cargo.toml @@ -16,23 +16,21 @@ gitlab = { repository = "msrd0/gotham-restful", branch = "master" } [dependencies] base64 = { version = "0.12.0", optional = true } -chrono = { version = "0.4.10", optional = true } +chrono = { version = "0.4.11", optional = true } cookie = { version = "0.13.3", optional = true } -futures = "0.3.4" futures-core = "0.3.4" futures-util = "0.3.4" gotham = { git = "https://github.com/gotham-rs/gotham", version = "0.5.0-dev", default-features = false } gotham_derive = { git = "https://github.com/gotham-rs/gotham", version = "0.5.0-dev" } gotham_middleware_diesel = { git = "https://github.com/gotham-rs/gotham", version = "0.1.0", optional = true } gotham_restful_derive = { version = "0.0.4-dev" } -hyper = "0.13.4" -indexmap = { version = "1.3.0", optional = true } +indexmap = { version = "1.3.2", optional = true } jsonwebtoken = { version = "7.1.0", optional = true } log = { version = "0.4.8", optional = true } mime = "0.3.16" openapiv3 = { version = "0.3", optional = true } -serde = { version = "1.0.104", features = ["derive"] } -serde_json = "1.0.45" +serde = { version = "1.0.106", features = ["derive"] } +serde_json = "1.0.51" uuid = { version = ">= 0.1, < 0.9", optional = true } [dev-dependencies] diff --git a/gotham_restful/src/auth.rs b/gotham_restful/src/auth.rs index 7ee6880..137e9b4 100644 --- a/gotham_restful/src/auth.rs +++ b/gotham_restful/src/auth.rs @@ -3,10 +3,10 @@ use cookie::CookieJar; use futures_util::{future, future::{FutureExt, TryFutureExt}}; use gotham::{ handler::HandlerFuture, + hyper::header::{AUTHORIZATION, HeaderMap}, middleware::{Middleware, NewMiddleware}, state::{FromState, State} }; -use hyper::header::{AUTHORIZATION, HeaderMap}; use jsonwebtoken::{ errors::ErrorKind, DecodingKey diff --git a/gotham_restful/src/openapi/router.rs b/gotham_restful/src/openapi/router.rs index ab4992b..a379585 100644 --- a/gotham_restful/src/openapi/router.rs +++ b/gotham_restful/src/openapi/router.rs @@ -188,12 +188,12 @@ impl Handler for OpenapiHandler match serde_json::to_string(&openapi) { Ok(body) => { - let res = create_response(&state, hyper::StatusCode::OK, APPLICATION_JSON, body); + let res = create_response(&state, crate::StatusCode::OK, APPLICATION_JSON, body); future::ok((state, res)).boxed() }, Err(e) => { error!("Unable to handle OpenAPI request due to error: {}", e); - let res = create_response(&state, hyper::StatusCode::INTERNAL_SERVER_ERROR, TEXT_PLAIN, ""); + let res = create_response(&state, crate::StatusCode::INTERNAL_SERVER_ERROR, TEXT_PLAIN, ""); future::ok((state, res)).boxed() } } @@ -303,7 +303,7 @@ impl<'a> OperationParams<'a> fn new_operation( operation_id : Option, - default_status : hyper::StatusCode, + default_status : crate::StatusCode, accepted_types : Option>, schema : ReferenceOr, params : OperationParams, diff --git a/gotham_restful/src/resource.rs b/gotham_restful/src/resource.rs index 39bd964..cd903b7 100644 --- a/gotham_restful/src/resource.rs +++ b/gotham_restful/src/resource.rs @@ -1,9 +1,9 @@ use crate::{DrawResourceRoutes, RequestBody, ResourceResult, ResourceType}; use gotham::{ extractor::QueryStringExtractor, + hyper::Body, state::State }; -use hyper::Body; use serde::de::DeserializeOwned; use std::{ future::Future, diff --git a/gotham_restful/src/routing.rs b/gotham_restful/src/routing.rs index 13672c2..b8d8c56 100644 --- a/gotham_restful/src/routing.rs +++ b/gotham_restful/src/routing.rs @@ -92,7 +92,7 @@ pub trait DrawResourceRoutes fn delete(&mut self); } -fn response_from(res : Response, state : &State) -> hyper::Response +fn response_from(res : Response, state : &State) -> gotham::hyper::Response { let mut r = create_empty_response(state, res.status); if let Some(mime) = res.mime diff --git a/gotham_restful_derive/Cargo.toml b/gotham_restful_derive/Cargo.toml index 0b65218..4166067 100644 --- a/gotham_restful_derive/Cargo.toml +++ b/gotham_restful_derive/Cargo.toml @@ -18,9 +18,9 @@ gitlab = { repository = "msrd0/gotham-restful", branch = "master" } [dependencies] heck = "0.3.1" -proc-macro2 = "1.0.8" -quote = "1.0.2" -syn = { version = "1.0.14", features = ["extra-traits", "full"] } +proc-macro2 = "1.0.10" +quote = "1.0.3" +syn = { version = "1.0.17", features = ["extra-traits", "full"] } [features] default = []