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
|
||||
[workspace.dependencies.aide]
|
||||
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
|
||||
[workspace.dependencies.arc-swap]
|
||||
|
||||
@@ -17,4 +17,6 @@ disallowed-methods = [
|
||||
disallowed-types = [
|
||||
{ path = "std::path::PathBuf", reason = "use camino::Utf8PathBuf 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 axum::{
|
||||
Json,
|
||||
extract::{
|
||||
FromRequestParts, Path, Query,
|
||||
rejection::{PathRejection, QueryRejection},
|
||||
},
|
||||
extract::{FromRequestParts, Path, rejection::PathRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_storage::pagination::PaginationDirection;
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -7,11 +7,8 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -5,11 +5,8 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use aide::{OperationIo, transform::TransformOperation};
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, rejection::QueryRejection},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{Json, response::IntoResponse};
|
||||
use axum_extra::extract::{Query, QueryRejection};
|
||||
use axum_macros::FromRequestParts;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::record_error;
|
||||
|
||||
@@ -8,9 +8,10 @@ use std::collections::HashMap;
|
||||
|
||||
use anyhow::Context;
|
||||
use axum::{
|
||||
extract::{Form, Path, Query, State},
|
||||
extract::{Form, Path, State},
|
||||
response::{Html, IntoResponse, Redirect, Response},
|
||||
};
|
||||
use axum_extra::extract::Query;
|
||||
use chrono::Duration;
|
||||
use mas_axum_utils::{
|
||||
InternalError,
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
extract::{Query, State},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum::{extract::State, response::IntoResponse};
|
||||
use axum_extra::extract::Query;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::{GenericError, InternalError};
|
||||
use mas_data_model::{BoxClock, BoxRng};
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
extract::{Query, State},
|
||||
extract::State,
|
||||
response::{Html, IntoResponse},
|
||||
};
|
||||
use axum_extra::extract::Query;
|
||||
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
||||
use mas_data_model::BoxClock;
|
||||
use mas_router::UrlBuilder;
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
Json,
|
||||
extract::{Query, State},
|
||||
response::IntoResponse,
|
||||
};
|
||||
use axum_extra::typed_header::TypedHeader;
|
||||
use axum::{Json, extract::State, response::IntoResponse};
|
||||
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||
use headers::ContentType;
|
||||
use mas_router::UrlBuilder;
|
||||
use oauth2_types::webfinger::WebFingerResponse;
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
extract::{Path, Query, State},
|
||||
extract::{Path, State},
|
||||
response::{IntoResponse, Redirect},
|
||||
};
|
||||
use axum_extra::extract::Query;
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::{GenericError, InternalError, cookies::CookieJar};
|
||||
use mas_data_model::{BoxClock, BoxRng, UpstreamOAuthProvider};
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
extract::{Query, State},
|
||||
extract::State,
|
||||
response::{Html, IntoResponse},
|
||||
};
|
||||
use axum_extra::extract::Query;
|
||||
use mas_axum_utils::{InternalError, cookies::CookieJar};
|
||||
use mas_data_model::{BoxClock, BoxRng};
|
||||
use mas_router::{PostAuthAction, UrlBuilder};
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
use std::sync::{Arc, LazyLock};
|
||||
|
||||
use axum::{
|
||||
extract::{Form, Query, State},
|
||||
extract::{Form, State},
|
||||
response::{Html, IntoResponse, Response},
|
||||
};
|
||||
use axum_extra::typed_header::TypedHeader;
|
||||
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||
use hyper::StatusCode;
|
||||
use mas_axum_utils::{
|
||||
InternalError, SessionInfoExt,
|
||||
|
||||
@@ -4,9 +4,10 @@
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
|
||||
use axum::{
|
||||
extract::{Query, State},
|
||||
extract::State,
|
||||
response::{Html, IntoResponse, Response},
|
||||
};
|
||||
use axum_extra::extract::Query;
|
||||
use mas_axum_utils::{InternalError, SessionInfoExt, cookies::CookieJar, csrf::CsrfExt as _};
|
||||
use mas_data_model::{BoxClock, BoxRng, SiteConfig};
|
||||
use mas_router::{PasswordRegister, UpstreamOAuth2Authorize, UrlBuilder};
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
use std::{str::FromStr, sync::Arc};
|
||||
|
||||
use axum::{
|
||||
extract::{Form, Query, State},
|
||||
extract::{Form, State},
|
||||
response::{Html, IntoResponse, Response},
|
||||
};
|
||||
use axum_extra::typed_header::TypedHeader;
|
||||
use axum_extra::{extract::Query, typed_header::TypedHeader};
|
||||
use hyper::StatusCode;
|
||||
use lettre::Address;
|
||||
use mas_axum_utils::{
|
||||
|
||||
Reference in New Issue
Block a user