From 84b77f4addbca76ee578ea698f111a09999d6653 Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Wed, 9 Oct 2024 13:37:38 -0400 Subject: [PATCH 1/2] docs: calirify default fields examples Signed-off-by: Alexandre Gaudreault --- internal/backend/api.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/backend/api.go b/internal/backend/api.go index 70bceac..a2b93ea 100644 --- a/internal/backend/api.go +++ b/internal/backend/api.go @@ -64,7 +64,7 @@ type CreateAccessRequestInput struct { // CreateAccessRequestBody defines the create access response body. type CreateAccessRequestBody struct { - RoleName string `json:"roleName" example:"custom-role" doc:"The role name to request."` + RoleName string `json:"roleName" example:"custom-role-template" doc:"The role name to request."` } // CreateAccessRequestResponse defines the create access response. @@ -78,9 +78,9 @@ type AccessRequestResponseBody struct { Name string `json:"name" example:"some-accessrequest" doc:"The access request name."` Namespace string `json:"namespace" example:"some-namespace" doc:"The access request namespace."` Username string `json:"username" example:"some-user@acme.org" doc:"The user associated with the access request."` - Permission string `json:"permission" example:"ReadOnly" doc:"The current permission description for the user."` + Permission string `json:"permission" example:"Operator Access" doc:"The permission description of the role associated to this access request."` + Role string `json:"role" example:"custom-role-template" doc:"The role template associated to this access request."` RequestedAt string `json:"requestedAt,omitempty" example:"2024-02-14T18:25:50Z" doc:"The timestamp the access was requested (RFC3339 format)." format:"date-time"` - Role string `json:"role,omitempty" example:"DevOps" doc:"The current role the user is associated with."` Status string `json:"status,omitempty" example:"GRANTED" doc:"The current access request status." enum:"REQUESTED,GRANTED,EXPIRED,DENIED,INVALID"` ExpiresAt string `json:"expiresAt,omitempty" example:"2024-02-14T18:25:50Z" doc:"The timestamp the access will expire (RFC3339 format)." format:"date-time"` Message string `json:"message,omitempty" example:"Click the link to see more details: ..." doc:"A human readeable description with details about the access request."` From 5ba7002103fcd84dbb5ed153350d928aa47628be Mon Sep 17 00:00:00 2001 From: Alexandre Gaudreault Date: Wed, 16 Oct 2024 09:04:45 -0400 Subject: [PATCH 2/2] review Signed-off-by: Alexandre Gaudreault --- internal/backend/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/backend/api.go b/internal/backend/api.go index a2b93ea..a806e83 100644 --- a/internal/backend/api.go +++ b/internal/backend/api.go @@ -64,7 +64,7 @@ type CreateAccessRequestInput struct { // CreateAccessRequestBody defines the create access response body. type CreateAccessRequestBody struct { - RoleName string `json:"roleName" example:"custom-role-template" doc:"The role name to request."` + RoleName string `json:"roleName" example:"custom-role-template" doc:"The role template name to request."` } // CreateAccessRequestResponse defines the create access response.