Skip to content

Commit db3dcce

Browse files
committed
use axum_extract's version of Query everywhere
1 parent a0c5583 commit db3dcce

File tree

20 files changed

+39
-64
lines changed

20 files changed

+39
-64
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ syn2mas = { path = "./crates/syn2mas", version = "=1.4.0-rc.1" }
6767
# OpenAPI schema generation and validation
6868
[workspace.dependencies.aide]
6969
version = "0.14.2"
70-
features = ["axum", "axum-extra", "axum-extra-query", "axum-json", "axum-query", "macros"]
70+
features = ["axum", "axum-extra", "axum-extra-query", "axum-json", "macros"]
7171

7272
# An `Arc` that can be atomically updated
7373
[workspace.dependencies.arc-swap]

clippy.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ disallowed-methods = [
1717
disallowed-types = [
1818
{ path = "std::path::PathBuf", reason = "use camino::Utf8PathBuf instead" },
1919
{ path = "std::path::Path", reason = "use camino::Utf8Path instead" },
20+
{ path = "axum::extract::Query", reason = "use axum_extra::extract::Query instead. The built-in version doesn't deserialise lists."},
21+
{ path = "axum::extract::rejection::QueryRejection", reason = "use axum_extra::extract::QueryRejection instead"}
2022
]

crates/handlers/src/admin/params.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ use std::{borrow::Cow, num::NonZeroUsize};
1212
use aide::OperationIo;
1313
use axum::{
1414
Json,
15-
extract::{
16-
FromRequestParts, Path, Query,
17-
rejection::{PathRejection, QueryRejection},
18-
},
15+
extract::{FromRequestParts, Path, rejection::PathRejection},
1916
response::IntoResponse,
2017
};
18+
use axum_extra::extract::{Query, QueryRejection};
2119
use axum_macros::FromRequestParts;
2220
use hyper::StatusCode;
2321
use mas_storage::pagination::PaginationDirection;

crates/handlers/src/admin/v1/compat_sessions/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
// Please see LICENSE files in the repository root for full details.
55

66
use aide::{OperationIo, transform::TransformOperation};
7-
use axum::{
8-
Json,
9-
extract::{Query, rejection::QueryRejection},
10-
response::IntoResponse,
11-
};
7+
use axum::{Json, response::IntoResponse};
8+
use axum_extra::extract::{Query, QueryRejection};
129
use axum_macros::FromRequestParts;
1310
use hyper::StatusCode;
1411
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/oauth2_sessions/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
use std::str::FromStr;
88

99
use aide::{OperationIo, transform::TransformOperation};
10-
use axum::{
11-
Json,
12-
extract::{Query, rejection::QueryRejection},
13-
response::IntoResponse,
14-
};
10+
use axum::{Json, response::IntoResponse};
11+
use axum_extra::extract::{Query, QueryRejection};
1512
use axum_macros::FromRequestParts;
1613
use hyper::StatusCode;
1714
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/upstream_oauth_links/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
// Please see LICENSE files in the repository root for full details.
55

66
use aide::{OperationIo, transform::TransformOperation};
7-
use axum::{
8-
Json,
9-
extract::{Query, rejection::QueryRejection},
10-
response::IntoResponse,
11-
};
7+
use axum::{Json, response::IntoResponse};
8+
use axum_extra::extract::{Query, QueryRejection};
129
use axum_macros::FromRequestParts;
1310
use hyper::StatusCode;
1411
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/upstream_oauth_providers/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
// Please see LICENSE files in the repository root for full details.
55

66
use aide::{OperationIo, transform::TransformOperation};
7-
use axum::{
8-
Json,
9-
extract::{Query, rejection::QueryRejection},
10-
response::IntoResponse,
11-
};
7+
use axum::{Json, response::IntoResponse};
8+
use axum_extra::extract::{Query, QueryRejection};
129
use axum_macros::FromRequestParts;
1310
use hyper::StatusCode;
1411
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/user_emails/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
// Please see LICENSE files in the repository root for full details.
55

66
use aide::{OperationIo, transform::TransformOperation};
7-
use axum::{
8-
Json,
9-
extract::{Query, rejection::QueryRejection},
10-
response::IntoResponse,
11-
};
7+
use axum::{Json, response::IntoResponse};
8+
use axum_extra::extract::{Query, QueryRejection};
129
use axum_macros::FromRequestParts;
1310
use hyper::StatusCode;
1411
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/user_registration_tokens/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
// Please see LICENSE files in the repository root for full details.
66

77
use aide::{OperationIo, transform::TransformOperation};
8-
use axum::{
9-
Json,
10-
extract::{Query, rejection::QueryRejection},
11-
response::IntoResponse,
12-
};
8+
use axum::{Json, response::IntoResponse};
9+
use axum_extra::extract::{Query, QueryRejection};
1310
use axum_macros::FromRequestParts;
1411
use hyper::StatusCode;
1512
use mas_axum_utils::record_error;

crates/handlers/src/admin/v1/user_sessions/list.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44
// Please see LICENSE files in the repository root for full details.
55

66
use aide::{OperationIo, transform::TransformOperation};
7-
use axum::{
8-
Json,
9-
extract::{Query, rejection::QueryRejection},
10-
response::IntoResponse,
11-
};
7+
use axum::{Json, response::IntoResponse};
8+
use axum_extra::extract::{Query, QueryRejection};
129
use axum_macros::FromRequestParts;
1310
use hyper::StatusCode;
1411
use mas_axum_utils::record_error;

0 commit comments

Comments
 (0)