From 0d31f2523690a6310b1f3d4d84be32e13e36c753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 30 Nov 2023 21:09:31 -0300 Subject: [PATCH 1/2] server: Fix endpoint not working MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- src/server.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 9bc89a4..2ec64a8 100644 --- a/src/server.rs +++ b/src/server.rs @@ -60,8 +60,9 @@ pub fn run(server_address: &str, mavlink_vehicle: &MAVLinkVehicleArcMutex) { web::get().to(endpoints::root), ) .route("/info", web::get().to(endpoints::info)) - .service(default) + // Be sure to have default as the latest endpoint, otherwise it does not work .service(v1) + .service(default) .build() }) .bind(server_address) From d882494dccb6978f35a36e29d3331f9ac036d497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 30 Nov 2023 21:11:19 -0300 Subject: [PATCH 2/2] Cargo: Remove paperclip from patrick and use official MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c6db9c5..6275120 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ lazy_static = "1.4.0" log = "0.4" env_logger = "0.8" mavlink = { version = "0.10.4", features = [ "ardupilotmega", "emit-extensions"] } -paperclip = { git = "https://github.com/patrickelectric/paperclip", branch = "patrick-swagger", features = ["actix", "swagger-ui"] } +paperclip = { version = "0.8", features = ["actix3", "v3", "paperclip-actix", "swagger-ui"] } regex = "1" serde = "1.0.115" serde_derive = "1.0.115"