about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPjotr Prins <pjotr.public01@thebird.nl>2026-10-13 08:25:36 +0200
committerPjotr Prins <pjotr.public01@thebird.nl>2026-10-13 08:25:36 +0200
commitaf476a5b18d755371edbfbf718e85a428a7827a6 (patch)
tree1d173432582191401f69622925d7337d5ebe81c8 /src/lib.rs
parentba00d2650ddbb3c9b73e01b6537aa53ac04f3cc3 (diff)
parent2551418eede25d0ffaebef67f9950f13e3551567 (diff)
downloadgenenetwork4-af476a5b18d755371edbfbf718e85a428a7827a6.tar.gz
Merge branch 'gemma'
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 75746d9..f011219 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,6 @@
 use axum::Json;
 use axum::Router;
+use gnauth_macros::gnauth;
 use tower_http::request_id::{MakeRequestUuid, PropagateRequestIdLayer, SetRequestIdLayer};
 use utoipa::OpenApi;
 use utoipa_axum::router::OpenApiRouter;
@@ -108,11 +109,13 @@ pub fn app() -> Router {
 // whose response is not wrapped in the envelope, like /openapi.json.
 // Both opt out of ApiDoc's default security requirement with an empty
 // security() -- neither takes an AuthToken, so documenting them as
-// needing one would be wrong, not just inconsistent.
+// needing one would be wrong, not just inconsistent. #[gnauth(disabled)]
+// below makes that a compile-time assertion, not just this comment.
 #[utoipa::path(get, path = "/", summary = "Greeting; confirms the server is up", responses(
     (status = 200, description = "Greeting", body = String),
     (status = 500, description = "Internal error", body = ApiError)
 ), security())]
+#[gnauth(disabled)]
 async fn hello_world() -> &'static str {
     "Hello, world!"
 }
@@ -131,6 +134,7 @@ struct VersionInfo {
     (status = 200, description = "Build information", body = Envelope<VersionInfo>),
     (status = 500, description = "Internal error", body = ApiError)
 ), security())]
+#[gnauth(disabled)]
 async fn version(ctx: Ctx) -> Json<Envelope<VersionInfo>> {
     Json(ctx.envelope(VersionInfo {
         name: "GeneNetwork4",