-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: upgrade utoipa to v5 (#65)
* chore(deps): bump utoipa to v5 * feat(openapi): scalar frontend * chore(api_admin): fix typo * refactor(backend): use utoipa-axum * refactor(api): use utoipa-axum * refactor: move openapi routes to backend * chore(api): remove unused deps * refactor(api): use utoipa-axum * refactor(api_mastodon): use utoipa-axum * refactor(well_known): use utoipa-axum * refactor(nodeinfo): use utoipa-axum * refactor(api_apub): use utoipa-axum * refactor(openapi): move specific options * refactor: remove `hatsu_openapi` crate
- Loading branch information
Showing
49 changed files
with
369 additions
and
413 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// pub mod entities; | ||
pub mod routes; | ||
|
||
pub use routes::routes; | ||
pub use routes::{routes, TAG}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
use axum::{routing::get, Router}; | ||
use utoipa::OpenApi; | ||
use utoipa_axum::{router::OpenApiRouter, routes}; | ||
|
||
pub mod generate_204; | ||
mod generate_204; | ||
|
||
use generate_204::generate_204; | ||
pub const TAG: &str = "hatsu"; | ||
|
||
pub fn routes() -> Router { | ||
Router::new().route("/api/v0/generate_204", get(generate_204)) | ||
#[derive(OpenApi)] | ||
#[openapi(tags((name = TAG, description = "Hatsu API (/api/v0/)")))] | ||
pub struct HatsuApi; | ||
|
||
pub fn routes() -> OpenApiRouter { | ||
OpenApiRouter::with_openapi(HatsuApi::openapi()).routes(routes!(generate_204::generate_204)) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub mod entities; | ||
pub mod routes; | ||
|
||
pub use routes::routes; | ||
pub use routes::{routes, TAG}; |
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.