Skip to content

Commit

Permalink
fix swagger ui
Browse files Browse the repository at this point in the history
  • Loading branch information
marenz2569 committed Nov 22, 2023
1 parent e70ac1f commit bb1d2ee
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rand = "*"
# hell
gpx = { version = "0"}

utoipa = { version = "3", features = ["actix_extras"] }
utoipa = { version = "3", features = ["actix_extras", "uuid", "chrono"] }
utoipa-swagger-ui = { version = "3", features = ["actix-web"] }
futures = "0.3"

Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
packages = {
trekkie = package;
test-vm = test-vm-pkg;
test-vm-wrapper = pkgs.writeScript "trekkie-test-vm-wrapper"
test-vm-wrapper = pkgs.writeScriptBin "trekkie-test-vm-wrapper"
''
set -e
Expand Down
3 changes: 2 additions & 1 deletion src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ impl error::ResponseError for ServerError {
user::UserLogin,
run::SubmitTravelV1,
run::SubmitTravelV2,
run::SubmitGpsPoint
run::SubmitGpsPoint,
run::SubmitRun
))
)]
pub struct ApiDoc;
6 changes: 3 additions & 3 deletions src/routes/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct SubmitRun {
post,
path = "/v2/trekkie",
responses(
(status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun),
(status = 200, description = "travel was successfully submitted", body = SubmitRun),
(status = 500, description = "postgres pool error")
),
)]
Expand Down Expand Up @@ -117,7 +117,7 @@ pub async fn travel_submit_run_v1(
post,
path = "/v2/trekkie",
responses(
(status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun),
(status = 200, description = "travel was successfully submitted", body = SubmitRun),
(status = 500, description = "postgres pool error")
),
)]
Expand Down Expand Up @@ -271,7 +271,7 @@ pub async fn terminate_run(
post,
path = "/v2/trekkie/{id}/live",
responses(
(status = 200, description = "travel was successfully submitted", body = crate::routes::SubmitRun),
(status = 200, description = "travel was successfully submitted", body = SubmitRun),
(status = 500, description = "postgres pool error")
),
)]
Expand Down
4 changes: 2 additions & 2 deletions src/routes/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn fetch_user(
post,
path = "/v2/user",
responses(
(status = 200, description = "trekkie user was successfully created", body = crate::routes::UserCreation),
(status = 200, description = "trekkie user was successfully created", body = UserCreation),
(status = 500, description = "postgres pool error")
),
)]
Expand Down Expand Up @@ -120,7 +120,7 @@ pub async fn user_create(
path = "/v2/auth/login",
request_body = UserLogin,
responses(
(status = 200, description = "trekkie user was successfully logged in", body = crate::routes::Response),
(status = 200, description = "trekkie user was successfully logged in", body = Response),
(status = 500, description = "postgres pool error")
),
)]
Expand Down

0 comments on commit bb1d2ee

Please sign in to comment.