From 1a81b437d82fd37af0e2c0888a124430a3f4f9a0 Mon Sep 17 00:00:00 2001 From: Vladimir Dronnikov Date: Mon, 4 Mar 2024 05:10:01 +0300 Subject: [PATCH] apidoc fixes (#2614) --- proto/src/internal/mod.rs | 2 +- server/core/src/https/apidocs/mod.rs | 4 ++++ server/core/src/https/v1_oauth2.rs | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/proto/src/internal/mod.rs b/proto/src/internal/mod.rs index b10c4da64..e067d6fb2 100644 --- a/proto/src/internal/mod.rs +++ b/proto/src/internal/mod.rs @@ -207,7 +207,7 @@ impl TryFrom<&str> for FsType { } } -#[derive(Debug, Serialize, Deserialize, Clone, Copy)] +#[derive(Debug, Serialize, Deserialize, Clone, Copy, ToSchema)] pub enum Oauth2ClaimMapJoin { #[serde(rename = "csv")] Csv, diff --git a/server/core/src/https/apidocs/mod.rs b/server/core/src/https/apidocs/mod.rs index 4b9722099..aa2919801 100644 --- a/server/core/src/https/apidocs/mod.rs +++ b/server/core/src/https/apidocs/mod.rs @@ -70,6 +70,9 @@ impl Modify for SecurityAddon { super::v1_oauth2::oauth2_id_scopemap_delete, super::v1_oauth2::oauth2_id_sup_scopemap_post, super::v1_oauth2::oauth2_id_sup_scopemap_delete, + super::v1_oauth2::oauth2_id_claimmap_join_post, + super::v1_oauth2::oauth2_id_claimmap_post, + super::v1_oauth2::oauth2_id_claimmap_delete, super::v1_scim::scim_sync_post, super::v1_scim::scim_sync_get, @@ -216,6 +219,7 @@ impl Modify for SecurityAddon { internal::Modify, internal::ModifyList, internal::ModifyRequest, + internal::Oauth2ClaimMapJoin, internal::OperationError, internal::PasskeyDetail, internal::PasswordFeedback, diff --git a/server/core/src/https/v1_oauth2.rs b/server/core/src/https/v1_oauth2.rs index b221b0169..981f09b1c 100644 --- a/server/core/src/https/v1_oauth2.rs +++ b/server/core/src/https/v1_oauth2.rs @@ -178,7 +178,7 @@ pub(crate) async fn oauth2_id_patch( } #[utoipa::path( - patch, + post, path = "/v1/oauth2/{rs_name}/_scopemap/{group}", request_body=Vec, responses( @@ -232,7 +232,7 @@ pub(crate) async fn oauth2_id_scopemap_delete( } #[utoipa::path( - patch, + post, path = "/v1/oauth2/{rs_name}/_claimmap/{claim_name}/{group}", request_body=Vec, responses( @@ -267,7 +267,7 @@ pub(crate) async fn oauth2_id_claimmap_post( } #[utoipa::path( - patch, + post, path = "/v1/oauth2/{rs_name}/_claimmap/{claim_name}", request_body=Oauth2ClaimMapJoin, responses(