forked from loafle/openapi-generator-original
Better context errors (#1198)
Update to version 2 of the `swagger` crate, which contains changes intended to make it easier to debug errors involving middleware and contexts. Crates making use of the autogenerated libraries to also update their swagger dependency to version 2. See [here](https://github.com/Metaswitch/swagger-rs/blob/2.0.0/CHANGELOG.md) for details.
This commit is contained in:
parent
40e90b5883
commit
eccab2c025
@ -19,7 +19,7 @@ chrono = { version = "0.4", features = ["serde"] }
|
||||
futures = "0.1"
|
||||
hyper = {version = "0.11", optional = true}
|
||||
hyper-tls = {version = "0.1.2", optional = true}
|
||||
swagger = "1.0.1"
|
||||
swagger = "2"
|
||||
|
||||
# Not required by example server.
|
||||
#
|
||||
|
@ -64,7 +64,7 @@ fn main() {
|
||||
};
|
||||
|
||||
let context: make_context_ty!(ContextBuilder, EmptyContext, Option<AuthData>, XSpanIdString) =
|
||||
make_context!(ContextBuilder, EmptyContext, None, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
make_context!(ContextBuilder, EmptyContext, None as Option<AuthData>, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
let client = client.with_context(context);
|
||||
|
||||
match matches.value_of("operation") {
|
||||
|
@ -17,7 +17,7 @@ chrono = { version = "0.4", features = ["serde"] }
|
||||
futures = "0.1"
|
||||
hyper = {version = "0.11", optional = true}
|
||||
hyper-tls = {version = "0.1.2", optional = true}
|
||||
swagger = "1.0.1"
|
||||
swagger = "2"
|
||||
|
||||
# Not required by example server.
|
||||
#
|
||||
|
@ -116,7 +116,7 @@ fn main() {
|
||||
};
|
||||
|
||||
let context: make_context_ty!(ContextBuilder, EmptyContext, Option<AuthData>, XSpanIdString) =
|
||||
make_context!(ContextBuilder, EmptyContext, None, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
make_context!(ContextBuilder, EmptyContext, None as Option<AuthData>, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
let client = client.with_context(context);
|
||||
|
||||
match matches.value_of("operation") {
|
||||
|
@ -17,7 +17,7 @@ chrono = { version = "0.4", features = ["serde"] }
|
||||
futures = "0.1"
|
||||
hyper = {version = "0.11", optional = true}
|
||||
hyper-tls = {version = "0.1.2", optional = true}
|
||||
swagger = "1.0.1"
|
||||
swagger = "2"
|
||||
|
||||
# Not required by example server.
|
||||
#
|
||||
|
@ -64,7 +64,7 @@ fn main() {
|
||||
};
|
||||
|
||||
let context: make_context_ty!(ContextBuilder, EmptyContext, Option<AuthData>, XSpanIdString) =
|
||||
make_context!(ContextBuilder, EmptyContext, None, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
make_context!(ContextBuilder, EmptyContext, None as Option<AuthData>, XSpanIdString(self::uuid::Uuid::new_v4().to_string()));
|
||||
let client = client.with_context(context);
|
||||
|
||||
match matches.value_of("operation") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user