use axum_extract's version of Query everywhere
This commit is contained in:
@@ -67,7 +67,7 @@ syn2mas = { path = "./crates/syn2mas", version = "=1.4.0-rc.1" }
|
|||||||
# OpenAPI schema generation and validation
|
# OpenAPI schema generation and validation
|
||||||
[workspace.dependencies.aide]
|
[workspace.dependencies.aide]
|
||||||
version = "0.14.2"
|
version = "0.14.2"
|
||||||
features = ["axum", "axum-extra", "axum-extra-query", "axum-json", "axum-query", "macros"]
|
features = ["axum", "axum-extra", "axum-extra-query", "axum-json", "macros"]
|
||||||
|
|
||||||
# An `Arc` that can be atomically updated
|
# An `Arc` that can be atomically updated
|
||||||
[workspace.dependencies.arc-swap]
|
[workspace.dependencies.arc-swap]
|
||||||
|
|||||||
@@ -17,4 +17,6 @@ disallowed-methods = [
|
|||||||
disallowed-types = [
|
disallowed-types = [
|
||||||
{ path = "std::path::PathBuf", reason = "use camino::Utf8PathBuf instead" },
|
{ path = "std::path::PathBuf", reason = "use camino::Utf8PathBuf instead" },
|
||||||
{ path = "std::path::Path", reason = "use camino::Utf8Path instead" },
|
{ path = "std::path::Path", reason = "use camino::Utf8Path instead" },
|
||||||
|
{ path = "axum::extract::Query", reason = "use axum_extra::extract::Query instead. The built-in version doesn't deserialise lists."},
|
||||||
|
{ path = "axum::extract::rejection::QueryRejection", reason = "use axum_extra::extract::QueryRejection instead"}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -12,12 +12,10 @@ use std::{borrow::Cow, num::NonZeroUsize};
|
|||||||
use aide::OperationIo;
|
use aide::OperationIo;
|
||||||
use axum::{
|
use axum::{
|
||||||
Json,
|
Json,
|
||||||
extract::{
|
extract::{FromRequestParts, Path, rejection::PathRejection},
|
||||||
FromRequestParts, Path, Query,
|
|
||||||
rejection::{PathRejection, QueryRejection},
|
|
||||||
},
|
|
||||||
response::IntoResponse,
|
response::IntoResponse,
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_storage::pagination::PaginationDirection;
|
use mas_storage::pagination::PaginationDirection;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -7,11 +7,8 @@
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -5,11 +5,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -5,11 +5,8 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use aide::{OperationIo, transform::TransformOperation};
|
use aide::{OperationIo, transform::TransformOperation};
|
||||||
use axum::{
|
use axum::{Json, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::extract::{Query, QueryRejection};
|
||||||
extract::{Query, rejection::QueryRejection},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_macros::FromRequestParts;
|
use axum_macros::FromRequestParts;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::record_error;
|
use mas_axum_utils::record_error;
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ use std::collections::HashMap;
|
|||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Form, Path, Query, State},
|
extract::{Form, Path, State},
|
||||||
response::{Html, IntoResponse, Redirect, Response},
|
response::{Html, IntoResponse, Redirect, Response},
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::Query;
|
||||||
use chrono::Duration;
|
use chrono::Duration;
|
||||||
use mas_axum_utils::{
|
use mas_axum_utils::{
|
||||||
InternalError,
|
InternalError,
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{extract::State, response::IntoResponse};
|
||||||
extract::{Query, State},
|
use axum_extra::extract::Query;
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::{GenericError, InternalError};
|
use mas_axum_utils::{GenericError, InternalError};
|
||||||
use mas_data_model::{BoxClock, BoxRng};
|
use mas_data_model::{BoxClock, BoxRng};
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Query, State},
|
extract::State,
|
||||||
response::{Html, IntoResponse},
|
response::{Html, IntoResponse},
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::Query;
|
||||||
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
||||||
use mas_data_model::BoxClock;
|
use mas_data_model::BoxClock;
|
||||||
use mas_router::UrlBuilder;
|
use mas_router::UrlBuilder;
|
||||||
|
|||||||
@@ -4,12 +4,8 @@
|
|||||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{Json, extract::State, response::IntoResponse};
|
||||||
Json,
|
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||||
extract::{Query, State},
|
|
||||||
response::IntoResponse,
|
|
||||||
};
|
|
||||||
use axum_extra::typed_header::TypedHeader;
|
|
||||||
use headers::ContentType;
|
use headers::ContentType;
|
||||||
use mas_router::UrlBuilder;
|
use mas_router::UrlBuilder;
|
||||||
use oauth2_types::webfinger::WebFingerResponse;
|
use oauth2_types::webfinger::WebFingerResponse;
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Path, Query, State},
|
extract::{Path, State},
|
||||||
response::{IntoResponse, Redirect},
|
response::{IntoResponse, Redirect},
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::Query;
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::{GenericError, InternalError, cookies::CookieJar};
|
use mas_axum_utils::{GenericError, InternalError, cookies::CookieJar};
|
||||||
use mas_data_model::{BoxClock, BoxRng, UpstreamOAuthProvider};
|
use mas_data_model::{BoxClock, BoxRng, UpstreamOAuthProvider};
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Query, State},
|
extract::State,
|
||||||
response::{Html, IntoResponse},
|
response::{Html, IntoResponse},
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::Query;
|
||||||
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
||||||
use mas_data_model::{BoxClock, BoxRng};
|
use mas_data_model::{BoxClock, BoxRng};
|
||||||
use mas_router::{PostAuthAction, UrlBuilder};
|
use mas_router::{PostAuthAction, UrlBuilder};
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
use std::sync::{Arc, LazyLock};
|
use std::sync::{Arc, LazyLock};
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Form, Query, State},
|
extract::{Form, State},
|
||||||
response::{Html, IntoResponse, Response},
|
response::{Html, IntoResponse, Response},
|
||||||
};
|
};
|
||||||
use axum_extra::typed_header::TypedHeader;
|
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use mas_axum_utils::{
|
use mas_axum_utils::{
|
||||||
InternalError, SessionInfoExt,
|
InternalError, SessionInfoExt,
|
||||||
|
|||||||
@@ -4,9 +4,10 @@
|
|||||||
// Please see LICENSE files in the repository root for full details.
|
// Please see LICENSE files in the repository root for full details.
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Query, State},
|
extract::State,
|
||||||
response::{Html, IntoResponse, Response},
|
response::{Html, IntoResponse, Response},
|
||||||
};
|
};
|
||||||
|
use axum_extra::extract::Query;
|
||||||
use mas_axum_utils::{InternalError, SessionInfoExt, cookies::CookieJar, csrf::CsrfExt as _};
|
use mas_axum_utils::{InternalError, SessionInfoExt, cookies::CookieJar, csrf::CsrfExt as _};
|
||||||
use mas_data_model::{BoxClock, BoxRng, SiteConfig};
|
use mas_data_model::{BoxClock, BoxRng, SiteConfig};
|
||||||
use mas_router::{PasswordRegister, UpstreamOAuth2Authorize, UrlBuilder};
|
use mas_router::{PasswordRegister, UpstreamOAuth2Authorize, UrlBuilder};
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
use std::{str::FromStr, sync::Arc};
|
use std::{str::FromStr, sync::Arc};
|
||||||
|
|
||||||
use axum::{
|
use axum::{
|
||||||
extract::{Form, Query, State},
|
extract::{Form, State},
|
||||||
response::{Html, IntoResponse, Response},
|
response::{Html, IntoResponse, Response},
|
||||||
};
|
};
|
||||||
use axum_extra::typed_header::TypedHeader;
|
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use lettre::Address;
|
use lettre::Address;
|
||||||
use mas_axum_utils::{
|
use mas_axum_utils::{
|
||||||
|
|||||||
Reference in New Issue
Block a user