-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds a new crate `utoipa-axum` which provides bindings between `axum` and `utoipa`. It aims to blend as much as possible to the existing philosophy of axum way of registering handlers. This commit introduces new `OpenApiRouter` what wraps `OpenApi` and axum `Router` which provides passthrough implementation for most of the axum Router methods and collects and combines the `OpenApi` from registered routes. Routes registred only via `routes!()` macro will get added to the `OpenApi`. Also this commit introduces `routes!()` macro which collects axum handlers annotated with `#[utoipa::path()]` attribute macro to single paths intance which is then provided to the `OpenApiRouter`. Fixes #991
- Loading branch information
Showing
11 changed files
with
182 additions
and
342 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
Oops, something went wrong.