-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rust-server] Enhance middleware support (+ perf fix) (#8114)
* Revert change to use a new hyper client on every request * Fix some formatting * Update sample after fixing formatting * Add constant with API version * Use semver::Version for ApiVersion * Go back to API version as a string * Rust composite services * added context type parameter to API trait * use Has<XSpanId> trait * added context type parameter to Service and Client structs * made AuthData in Context an option in client * updated client example using generic contexts * added generic context parameters in server/auth * use ExtendsWith with associated types * added (fake) X-Span-ID in auth::Service * updated server example with generic contexts * use real X-Span-ID in auth wrapper service and remove from main server code * only require Has<Option<Authorization>> if API has auth methods * tidy up swagger imports * Actually use the version from the swagger file * remove old comments * add AuthData/Authorization requirements only when AuthMethods are present * updated auth to use new version of the Has trait * update example code to use new Has trait * updated examples to use version of AllowAllAuthenticator that consumes AuthData * update examples to use macros for constructing contexts * use new versions of context traits * autogen sample * rename EmpContext to EmptyContext * fix indentation * remove unecessary uses of Context, and rename existing ones to ContextBuilder * replace Has::<T>::get(&context) with (&context as &Has<T>).get() * remove github dependency for swagger-rs * tidy up swagger entry in Cargo.toml * Update to swagger-rs 0.12.0, and remove warning-inducing extra parentheses * Update petstore examples * Bump to swagger-rs 0.12.1
- Loading branch information
Showing
22 changed files
with
772 additions
and
744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.