diff --git a/internal/delivery/http/permission.go b/internal/delivery/http/permission.go index 0b473a32..84a04875 100644 --- a/internal/delivery/http/permission.go +++ b/internal/delivery/http/permission.go @@ -33,6 +33,8 @@ func NewPermissionHandler(usecase usecase.Usecase) *PermissionHandler { // @Produce json // @Success 200 {object} domain.PermissionSet // @Router /permissions/templates [get] +// @Security JWT + func (h PermissionHandler) GetPermissionTemplates(w http.ResponseWriter, r *http.Request) { permissionSet := domain.NewDefaultPermissionSet() @@ -54,7 +56,9 @@ func (h PermissionHandler) GetPermissionTemplates(w http.ResponseWriter, r *http // @Accept json // @Produce json // @Success 200 {object} domain.PermissionSet -// @Router /roles/{roleId}/permissions [get] +// @Router organizations/{organizationId}/roles/{roleId}/permissions [get] +// @Security JWT + func (h PermissionHandler) GetPermissionsByRoleId(w http.ResponseWriter, r *http.Request) { // path parameter var roleId string @@ -93,7 +97,9 @@ func (h PermissionHandler) GetPermissionsByRoleId(w http.ResponseWriter, r *http // @Param roleId path string true "Role ID" // @Param body body domain.UpdatePermissionsByRoleIdRequest true "Update Permissions By Role ID Request" // @Success 200 -// @Router /roles/{roleId}/permissions [put] +// @Router organizations/{organizationId}/roles/{roleId}/permissions [put] +// @Security JWT + func (h PermissionHandler) UpdatePermissionsByRoleId(w http.ResponseWriter, r *http.Request) { // path parameter log.Debug("UpdatePermissionsByRoleId Called") diff --git a/internal/delivery/http/role.go b/internal/delivery/http/role.go index 7408878d..1e72fd05 100644 --- a/internal/delivery/http/role.go +++ b/internal/delivery/http/role.go @@ -44,6 +44,7 @@ func NewRoleHandler(usecase usecase.Usecase) *RoleHandler { // @Param body body domain.CreateTksRoleRequest true "Create Tks Role Request" // @Success 200 {object} domain.CreateTksRoleResponse // @Router /organizations/{organizationId}/roles [post] +// @Security JWT func (h RoleHandler) CreateTksRole(w http.ResponseWriter, r *http.Request) { // path parameter @@ -101,6 +102,8 @@ func (h RoleHandler) CreateTksRole(w http.ResponseWriter, r *http.Request) { // @Param organizationId path string true "Organization ID" // @Success 200 {object} domain.ListTksRoleResponse // @Router /organizations/{organizationId}/roles [get] +// @Security JWT + func (h RoleHandler) ListTksRoles(w http.ResponseWriter, r *http.Request) { // path parameter var organizationId string @@ -155,6 +158,7 @@ func (h RoleHandler) ListTksRoles(w http.ResponseWriter, r *http.Request) { // @Param roleId path string true "Role ID" // @Success 200 {object} domain.GetTksRoleResponse // @Router /organizations/{organizationId}/roles/{roleId} [get] +// @Security JWT func (h RoleHandler) GetTksRole(w http.ResponseWriter, r *http.Request) { // path parameter @@ -196,6 +200,7 @@ func (h RoleHandler) GetTksRole(w http.ResponseWriter, r *http.Request) { // @Param roleId path string true "Role ID" // @Success 200 // @Router /organizations/{organizationId}/roles/{roleId} [delete] +// @Security JWT func (h RoleHandler) DeleteTksRole(w http.ResponseWriter, r *http.Request) { // path parameter @@ -229,6 +234,7 @@ func (h RoleHandler) DeleteTksRole(w http.ResponseWriter, r *http.Request) { // @Param body body domain.UpdateTksRoleRequest true "Update Tks Role Request" // @Success 200 // @Router /organizations/{organizationId}/roles/{roleId} [put] +// @Security JWT func (h RoleHandler) UpdateTksRole(w http.ResponseWriter, r *http.Request) { // path parameter