fix(grants): show /grants on openapi
This commit is contained in:
@@ -52,6 +52,10 @@ use crate::interfaces::api::handlers::contacts_handler::{
|
|||||||
use crate::interfaces::api::handlers::dedup_handler::{
|
use crate::interfaces::api::handlers::dedup_handler::{
|
||||||
DedupUploadResponse, HashCheckResponse, StatsResponse,
|
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;
|
use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
|
||||||
|
|
||||||
#[derive(OpenApi)]
|
#[derive(OpenApi)]
|
||||||
@@ -202,6 +206,13 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
|
|||||||
handlers::admin_handler::complete_migration,
|
handlers::admin_handler::complete_migration,
|
||||||
handlers::admin_handler::verify_migration,
|
handlers::admin_handler::verify_migration,
|
||||||
handlers::admin_handler::generate_encryption_key,
|
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(
|
components(
|
||||||
schemas(
|
schemas(
|
||||||
@@ -275,6 +286,16 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
|
|||||||
UpdateContactRequest,
|
UpdateContactRequest,
|
||||||
GroupNameRequest,
|
GroupNameRequest,
|
||||||
AddMemberRequest,
|
AddMemberRequest,
|
||||||
|
// Grant / ReBAC schemas
|
||||||
|
SubjectTypeDto,
|
||||||
|
SubjectDto,
|
||||||
|
ResourceTypeDto,
|
||||||
|
ResourceDto,
|
||||||
|
PermissionDto,
|
||||||
|
Role,
|
||||||
|
CreateGrantDto,
|
||||||
|
UpdateRoleDto,
|
||||||
|
GrantDto,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
tags(
|
tags(
|
||||||
@@ -293,6 +314,7 @@ use crate::interfaces::api::handlers::file_handler::MoveFilePayload;
|
|||||||
(name = "playlists", description = "Music playlist endpoints"),
|
(name = "playlists", description = "Music playlist endpoints"),
|
||||||
(name = "contacts", description = "Address books, contacts, and groups endpoints"),
|
(name = "contacts", description = "Address books, contacts, and groups endpoints"),
|
||||||
(name = "admin", description = "Admin management endpoints"),
|
(name = "admin", description = "Admin management endpoints"),
|
||||||
|
(name = "grants", description = "ReBAC grant management endpoints"),
|
||||||
),
|
),
|
||||||
info(
|
info(
|
||||||
title = "OxiCloud API",
|
title = "OxiCloud API",
|
||||||
|
|||||||
Reference in New Issue
Block a user