From 7480f69450122cd63749ab360d41670fe97a992a Mon Sep 17 00:00:00 2001 From: steven Date: Sun, 12 Oct 2025 22:53:44 -0500 Subject: [PATCH 1/2] Removed a duplicate binding for an address for rust-server. The address binding happens higher up in the method. --- .../main/resources/rust-server/example-server-common.mustache | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache b/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache index a54fe26e8a96..f69f727b2992 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/example-server-common.mustache @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { From 86688aef3a49ded7783340423d89ed2ad8de6b07 Mon Sep 17 00:00:00 2001 From: steven Date: Sun, 12 Oct 2025 23:00:07 -0500 Subject: [PATCH 2/2] Updated samples. --- .../rust-server/output/multipart-v3/examples/server/server.rs | 2 -- .../rust-server/output/no-example-v3/examples/server/server.rs | 2 -- .../rust-server/output/openapi-v3/examples/client/server.rs | 2 -- .../rust-server/output/openapi-v3/examples/server/server.rs | 2 -- .../rust-server/output/ops-v3/examples/server/server.rs | 2 -- .../examples/server/server.rs | 2 -- .../output/ping-bearer-auth/examples/server/server.rs | 2 -- .../output/rust-server-test/examples/server/server.rs | 2 -- 8 files changed, 16 deletions(-) diff --git a/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs index c84b0f4f24ab..29377f99bde5 100644 --- a/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/multipart-v3/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs index 47b77f5710e2..7887a2ee8c52 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs b/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs index 6a136da4e50c..417f3408b577 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/examples/client/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs index bc8a98341705..d69f9bf2bc83 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs b/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs index 599ae2176571..9aa4b96bdf32 100644 --- a/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/ops-v3/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs index b4e002adff73..c9a0e821c0ba 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs b/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs index 8ab78be8cb33..730c04688602 100644 --- a/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop { diff --git a/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs b/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs index 2670ed062857..144228beed8e 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/examples/server/server.rs @@ -76,8 +76,6 @@ pub async fn create(addr: &str, https: bool) { } } else { info!("Starting a server (over http, so no TLS)"); - // Using HTTP - let listener = TcpListener::bind(&addr).await.unwrap(); println!("Listening on http://{}", addr); loop {