Skip to content

Commit 9189368

Browse files
committed
Bump axum and axum-extra to latest version.
- This bump requires fixing path parameters due to matchit transitive dependency changes (See tokio-rs/axum#2645). - The `Host` extractor has been moved from `axum` to `axum-extra`.
1 parent 5ecde55 commit 9189368

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustAxumServerCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
427427
for (CodegenParameter param : op.pathParams) {
428428
// Replace {baseName} with {paramName} for format string
429429
String paramSearch = "{" + param.baseName + "}";
430-
String paramReplace = ":" + param.paramName;
430+
String paramReplace = "{" + param.paramName + "}";
431431

432432
axumPath = axumPath.replace(paramSearch, paramReplace);
433433
}

modules/openapi-generator/src/main/resources/rust-axum/Cargo.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ conversion = [
4040

4141
[dependencies]
4242
async-trait = "0.1"
43-
axum = "0.7"
44-
axum-extra = { version = "0.9", features = ["cookie", "multipart"] }
43+
axum = "0.8"
44+
axum-extra = { version = "0.10", features = ["cookie", "multipart"] }
4545
base64 = "0.22"
4646
bytes = "1"
4747
chrono = { version = "0.4", features = ["serde"] }

modules/openapi-generator/src/main/resources/rust-axum/apis.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use async_trait::async_trait;
22
use axum::extract::*;
3-
use axum_extra::extract::{CookieJar, Multipart};
3+
use axum_extra::extract::{CookieJar, Host, Multipart};
44
use bytes::Bytes;
55
use http::Method;
66
use serde::{Deserialize, Serialize};

modules/openapi-generator/src/main/resources/rust-axum/server-imports.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashMap;
22

33
use axum::{body::Body, extract::*, response::Response, routing::*};
4-
use axum_extra::extract::{CookieJar, Multipart};
4+
use axum_extra::extract::{CookieJar, Host, Multipart};
55
use bytes::Bytes;
66
use http::{header::CONTENT_TYPE, HeaderMap, HeaderName, HeaderValue, Method, StatusCode};
77
use tracing::error;

0 commit comments

Comments
 (0)