From c179017f960a432054ffc2c7dbf11bffa109e1e7 Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier Date: Fri, 17 Jan 2025 22:09:09 +0100 Subject: [PATCH] Add types for responding to Authentication requests. --- api/src/lib.rs | 2 ++ api/src/openapi/authentication_rest.rs | 16 ++++++++++++++++ api/src/openapi/mod.rs | 1 + 3 files changed, 19 insertions(+) create mode 100644 api/src/openapi/authentication_rest.rs create mode 100644 api/src/openapi/mod.rs diff --git a/api/src/lib.rs b/api/src/lib.rs index 5cb7041..4a38ac9 100644 --- a/api/src/lib.rs +++ b/api/src/lib.rs @@ -5,3 +5,5 @@ #[allow(dead_code)] pub mod schema; pub use schema::*; + +mod openapi; diff --git a/api/src/openapi/authentication_rest.rs b/api/src/openapi/authentication_rest.rs new file mode 100644 index 0000000..50cb9b9 --- /dev/null +++ b/api/src/openapi/authentication_rest.rs @@ -0,0 +1,16 @@ +/// Code generated by ogen, converted via Copilot and rewritten manually. +pub mod openapi { + pub struct AuthenticationMethod(String); + + pub struct BasicAuth { + pub username: String, + pub password: String, + } + + pub mod responses { + + pub struct Unauthorized { + pub www_authenticate: Option, + } + } +} diff --git a/api/src/openapi/mod.rs b/api/src/openapi/mod.rs new file mode 100644 index 0000000..ac7fde7 --- /dev/null +++ b/api/src/openapi/mod.rs @@ -0,0 +1 @@ +mod authentication_rest;