SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat(authz): update openapi spec (#10382)
Vikrant Gupta0dd42ec076cc
diff --git a/docs/api/openapi.yml b/docs/api/openapi.ymlindex 28a2ea54de..201a9d6c76 100644--- a/docs/api/openapi.yml+++ b/docs/api/openapi.yml@@ -100,6 +100,10 @@ components:$ref: '#/components/schemas/AuthtypesObject'relation:type: string+ required:+ - relation+ - object+ - authorizedtype: objectAuthtypesGoogleConfig:properties:@@ -1672,6 +1676,9 @@ components:$ref: '#/components/schemas/AuthtypesResource'nullable: truetype: array+ required:+ - resources+ - relationstype: objectRoletypesPatchableObjects:properties:@@ -1692,8 +1699,9 @@ components:RoletypesPatchableRole:properties:description:- nullable: truetype: string+ required:+ - descriptiontype: objectRoletypesPostableRole:properties:@@ -1722,6 +1730,11 @@ components:updatedAt:format: date-timetype: string+ required:+ - name+ - description+ - type+ - orgIdtype: objectTelemetrytypesFieldContext:enum:diff --git a/frontend/src/api/generated/services/sigNoz.schemas.ts b/frontend/src/api/generated/services/sigNoz.schemas.tsindex 787514ade4..3c5523f71f 100644--- a/frontend/src/api/generated/services/sigNoz.schemas.ts+++ b/frontend/src/api/generated/services/sigNoz.schemas.ts@@ -131,12 +131,12 @@ export interface AuthtypesGettableTransactionDTO {/*** @type boolean*/- authorized?: boolean;- object?: AuthtypesObjectDTO;+ authorized: boolean;+ object: AuthtypesObjectDTO;/*** @type string*/- relation?: string;+ relation: string;}export type AuthtypesGoogleConfigDTODomainToAdminEmail = {@@ -2004,12 +2004,12 @@ export interface RoletypesGettableResourcesDTO {* @type object* @nullable true*/- relations?: RoletypesGettableResourcesDTORelations;+ relations: RoletypesGettableResourcesDTORelations;/*** @type array* @nullable true*/- resources?: AuthtypesResourceDTO[] | null;+ resources: AuthtypesResourceDTO[] | null;}export interface RoletypesPatchableObjectsDTO {@@ -2028,9 +2028,8 @@ export interface RoletypesPatchableObjectsDTO {export interface RoletypesPatchableRoleDTO {/*** @type string- * @nullable true*/- description?: string | null;+ description: string;}export interface RoletypesPostableRoleDTO {@@ -2053,7 +2052,7 @@ export interface RoletypesRoleDTO {/*** @type string*/- description?: string;+ description: string;/*** @type string*/@@ -2061,15 +2060,15 @@ export interface RoletypesRoleDTO {/*** @type string*/- name?: string;+ name: string;/*** @type string*/- orgId?: string;+ orgId: string;/*** @type string*/- type?: string;+ type: string;/*** @type string* @format date-timediff --git a/pkg/types/authtypes/transaction.go b/pkg/types/authtypes/transaction.goindex 31b1030058..59483ebf8c 100644--- a/pkg/types/authtypes/transaction.go+++ b/pkg/types/authtypes/transaction.go@@ -26,9 +26,9 @@ type Transaction struct {}type GettableTransaction struct {- Relation Relation `json:"relation"`- Object Object `json:"object"`- Authorized bool `json:"authorized"`+ Relation Relation `json:"relation" required:"true"`+ Object Object `json:"object" required:"true"`+ Authorized bool `json:"authorized" required:"true"`}func NewObject(resource Resource, selector Selector) (*Object, error) {diff --git a/pkg/types/roletypes/role.go b/pkg/types/roletypes/role.goindex 9aee220c24..2eb5141f78 100644--- a/pkg/types/roletypes/role.go+++ b/pkg/types/roletypes/role.go@@ -69,10 +69,10 @@ type StorableRole struct {type Role struct {types.Identifiabletypes.TimeAuditable- Name string `json:"name"`- Description string `json:"description"`- Type valuer.String `json:"type"`- OrgID valuer.UUID `json:"orgId"`+ Name string `json:"name" required:"true"`+ Description string `json:"description" required:"true"`+ Type valuer.String `json:"type" required:"true"`+ OrgID valuer.UUID `json:"orgId" required:"true"`}type PostableRole struct {@@ -81,7 +81,7 @@ type PostableRole struct {}type PatchableRole struct {- Description *string `json:"description"`+ Description string `json:"description" required:"true"`}type PatchableObjects struct {@@ -90,8 +90,8 @@ type PatchableObjects struct {}type GettableResources struct {- Resources []*authtypes.Resource `json:"resources"`- Relations map[authtypes.Type][]authtypes.Relation `json:"relations"`+ Resources []*authtypes.Resource `json:"resources" required:"true"`+ Relations map[authtypes.Type][]authtypes.Relation `json:"relations" required:"true"`}func NewStorableRoleFromRole(role *Role) *StorableRole {@@ -149,15 +149,13 @@ func NewGettableResources(resources []*authtypes.Resource) *GettableResources {}}-func (role *Role) PatchMetadata(description *string) error {+func (role *Role) PatchMetadata(description string) error {err := role.CanEditDelete()if err != nil {return err}- if description != nil {- role.Description = *description- }+ role.Description = descriptionrole.UpdatedAt = time.Now()return nil}@@ -222,7 +220,7 @@ func (role *PostableRole) UnmarshalJSON(data []byte) error {func (role *PatchableRole) UnmarshalJSON(data []byte) error {type shadowPatchableRole struct {- Description *string `json:"description"`+ Description string `json:"description"`}var shadowRole shadowPatchableRole@@ -230,7 +228,7 @@ func (role *PatchableRole) UnmarshalJSON(data []byte) error {return err}- if shadowRole.Description == nil {+ if shadowRole.Description == "" {return errors.New(errors.TypeInvalidInput, ErrCodeRoleEmptyPatch, "empty role patch request received, description must be present")}