fix(grants): show /grants on openapi

This commit is contained in:
Edouard Vanbelle
2026-05-23 23:51:32 +02:00
parent 1dbd56e9cc
commit 50d13943fc
+22
View File
@@ -52,6 +52,10 @@ use crate::interfaces::api::handlers::contacts_handler::{
use crate::interfaces::api::handlers::dedup_handler::{
DedupUploadResponse, HashCheckResponse, StatsResponse,
};
use crate::application::dtos::grant_dto::{
CreateGrantDto, GrantDto, PermissionDto, ResourceDto, ResourceTypeDto, Role, SubjectDto,
SubjectTypeDto, UpdateRoleDto,
};
use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
#[derive(OpenApi)]
@@ -202,6 +206,13 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
handlers::admin_handler::complete_migration,
handlers::admin_handler::verify_migration,
handlers::admin_handler::generate_encryption_key,
// Grant / ReBAC handlers (free functions)
handlers::grant_handler::create_grant,
handlers::grant_handler::revoke_grant,
handlers::grant_handler::set_role,
handlers::grant_handler::list_incoming,
handlers::grant_handler::list_outgoing,
handlers::grant_handler::list_on_resource,
),
components(
schemas(
@@ -275,6 +286,16 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
UpdateContactRequest,
GroupNameRequest,
AddMemberRequest,
// Grant / ReBAC schemas
SubjectTypeDto,
SubjectDto,
ResourceTypeDto,
ResourceDto,
PermissionDto,
Role,
CreateGrantDto,
UpdateRoleDto,
GrantDto,
)
),
tags(
@@ -293,6 +314,7 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
(name = "playlists", description = "Music playlist endpoints"),
(name = "contacts", description = "Address books, contacts, and groups endpoints"),
(name = "admin", description = "Admin management endpoints"),
(name = "grants", description = "ReBAC grant management endpoints"),
),
info(
title = "OxiCloud API",