Skip to content

Commit 684698d

Browse files
dependabot[bot]woshilapin
authored andcommitted
editoast: bump axum from 0.7.9 to 0.8.1 in /editoast
Bumps [axum](https://github.com/tokio-rs/axum) from 0.7.9 to 0.8.1. - [Release notes](https://github.com/tokio-rs/axum/releases) - [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/axum/commits) --- updated-dependencies: - dependency-name: axum dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
1 parent 5cc4921 commit 684698d

File tree

3 files changed

+81
-44
lines changed

3 files changed

+81
-44
lines changed

editoast/Cargo.lock

+70-19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editoast/Cargo.toml

+10-6
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ uuid = { version = "1.11.0", features = ["serde", "v4"] }
9494
[dependencies]
9595
anyhow = "1.0"
9696
async-trait = "0.1.84"
97-
axum = { version = "0.7.9", default-features = false, features = [
97+
axum = { version = "0.8.1", default-features = false, features = [
9898
"multipart",
9999
"tracing",
100100
] }
101-
axum-extra = { version = "0.9.6", default-features = false, features = [
101+
axum-extra = { version = "0.10.0", default-features = false, features = [
102102
"typed-header",
103103
] }
104-
axum-test = { version = "16.4.1", default-features = false }
105-
axum-tracing-opentelemetry = { version = "0.24.1", default-features = false, features = [
104+
axum-test = { version = "17.0.1", default-features = false }
105+
axum-tracing-opentelemetry = { version = "0.25.0", default-features = false, features = [
106106
"tracing_level_info",
107107
] }
108108
chrono.workspace = true
@@ -172,7 +172,11 @@ regex = "1.11.1"
172172
reqwest.workspace = true
173173
serde = { workspace = true, features = ["derive"] }
174174
serde_json.workspace = true
175-
serde_qs = { version = "0.13.0", features = ["axum"] }
175+
# official serde_qs seems unmaintained. Bump to `axum:0.8` is an opened PR waiting to be merged.
176+
# https://github.com/samscott89/serde_qs/pull/118
177+
serde_qs = { version = "0.13.0", git = "https://github.com/Atrox/serde_qs", rev = "2cfa3ee0", features = [
178+
"axum",
179+
] }
176180
serde_yaml = "0.9.34"
177181
sha1 = "0.10"
178182
strum.workspace = true
@@ -197,7 +201,7 @@ validator = { version = "0.19.0", features = ["derive"] }
197201

198202
[dev-dependencies]
199203
async-std = { version = "1.13.0", features = ["attributes", "tokio1"] }
200-
axum = { version = "0.7.9", default-features = false, features = [
204+
axum = { version = "0.8.1", default-features = false, features = [
201205
"macros",
202206
"multipart",
203207
"tracing",

editoast/src/views/openapi.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,6 @@ where
6666
}
6767
}
6868

69-
/// Reformats a service path defined in the OpenApi format to the Axum format
70-
///
71-
/// For path parameters, the OpenApi format uses curly braces, e.g. `/users/{id}`.
72-
/// The Axum format uses a colon, e.g. `/users/:id`.
73-
/// The `routes!` macro requires path parameters to be defined in the OpenApi format.
74-
pub(in crate::views) fn format_axum_path_parameters(url_with_path_params: &str) -> String {
75-
url_with_path_params
76-
.split('/')
77-
.map(|part| {
78-
if part.starts_with('{') && part.ends_with('}') {
79-
format!(":{}", &part[1..part.len() - 1])
80-
} else {
81-
part.to_string()
82-
}
83-
})
84-
.join("/")
85-
}
86-
8769
#[allow(unused)]
8870
impl OpenApiPathScope {
8971
pub fn new(prefix: Option<&'static str>) -> Self {
@@ -227,7 +209,7 @@ macro_rules! routes {
227209
(@router [$router:expr] $prefix:literal => {$($tt:tt)+} , $($rest:tt)*) => {
228210
$crate::routes!(@router
229211
[$router.nest(
230-
&$crate::views::openapi::format_axum_path_parameters($prefix),
212+
&$prefix,
231213
$crate::routes!(@router [axum::Router::<$crate::AppState>::new()] $($tt)+)
232214
)]
233215
$($rest)*

0 commit comments

Comments
 (0)