feat(openapi): show explicitly path requiring bearerAuth
This commit is contained in:
@@ -221,6 +221,7 @@ fn user_to_contact(user: UserDto) -> ContactDto {
|
||||
(status = 200, description = "List of address books"),
|
||||
(status = 500, description = "Internal server error"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn list_address_books(
|
||||
@@ -289,6 +290,7 @@ pub async fn list_address_books(
|
||||
(status = 201, description = "Address book created", body = AddressBookResponse),
|
||||
(status = 400, description = "Invalid input"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn create_address_book(
|
||||
@@ -336,6 +338,7 @@ pub async fn create_address_book(
|
||||
(status = 403, description = "Only the owner can update"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn update_address_book(
|
||||
@@ -391,6 +394,7 @@ pub async fn update_address_book(
|
||||
(status = 403, description = "Only the owner can delete"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn delete_address_book(
|
||||
@@ -431,6 +435,7 @@ pub async fn delete_address_book(
|
||||
(status = 403, description = "Access denied"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn list_contacts(
|
||||
@@ -487,6 +492,7 @@ pub async fn list_contacts(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn create_contact(
|
||||
@@ -541,6 +547,7 @@ pub async fn create_contact(
|
||||
(status = 403, description = "Access denied"),
|
||||
(status = 404, description = "Contact not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn get_contact(
|
||||
@@ -607,6 +614,7 @@ pub async fn get_contact(
|
||||
(status = 404, description = "Contact not found"),
|
||||
(status = 412, description = "ETag mismatch — contact was modified"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn update_contact(
|
||||
@@ -687,6 +695,7 @@ pub async fn update_contact(
|
||||
(status = 404, description = "Contact not found"),
|
||||
(status = 412, description = "ETag mismatch"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn delete_contact(
|
||||
@@ -747,6 +756,7 @@ pub async fn delete_contact(
|
||||
(status = 403, description = "Access denied"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn list_groups(
|
||||
@@ -780,6 +790,7 @@ pub async fn list_groups(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Address book not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn create_group(
|
||||
@@ -818,6 +829,7 @@ pub async fn create_group(
|
||||
(status = 403, description = "Access denied"),
|
||||
(status = 404, description = "Group not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn get_group(
|
||||
@@ -858,6 +870,7 @@ pub async fn get_group(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Group not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn update_group(
|
||||
@@ -895,6 +908,7 @@ pub async fn update_group(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Group not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn delete_group(
|
||||
@@ -933,6 +947,7 @@ pub async fn delete_group(
|
||||
(status = 403, description = "Access denied"),
|
||||
(status = 404, description = "Group not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn list_contacts_in_group(
|
||||
@@ -974,6 +989,7 @@ pub async fn list_contacts_in_group(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Group or contact not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn add_contact_to_group(
|
||||
@@ -1016,6 +1032,7 @@ pub async fn add_contact_to_group(
|
||||
(status = 403, description = "Access denied or read-only book"),
|
||||
(status = 404, description = "Group or contact not found"),
|
||||
),
|
||||
security(("bearerAuth" = [])),
|
||||
tag = "contacts"
|
||||
)]
|
||||
pub async fn remove_contact_from_group(
|
||||
|
||||
Reference in New Issue
Block a user