Skip to content

Commit

Permalink
fix: realm groups api spec, fixes #192 (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
raffis authored Mar 18, 2024
1 parent 0a86f88 commit 9042bf7
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 5 deletions.
12 changes: 11 additions & 1 deletion api/v1beta1/keycloakrealm_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ type KeycloakAPIRealm struct {
// Enabled event types
// +optional

Groups []string `json:"groups,omitempty"`
Groups []KeycloakAPIGroup `json:"groups,omitempty"`

EnabledEventTypes []string `json:"enabledEventTypes,omitempty"`
// Enable events recording
Expand Down Expand Up @@ -862,3 +862,13 @@ type TokenResponse struct {
// +optional
ErrorDescription string `json:"error_description"`
}

type KeycloakAPIGroup struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
RealmRoles []string `json:"realmRoles,omitempty"`
Attributes map[string][]string `json:"attributes,omitempty"`
ClientRoles map[string][]string `json:"clientRoles,omitempty"`
SubGroups []extv1.JSON `json:"subGroups,omitempty"`
}
63 changes: 61 additions & 2 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,34 @@ spec:
type: integer
groups:
items:
type: string
properties:
attributes:
additionalProperties:
items:
type: string
type: array
type: object
clientRoles:
additionalProperties:
items:
type: string
type: array
type: object
id:
type: string
name:
type: string
path:
type: string
realmRoles:
items:
type: string
type: array
subGroups:
items:
x-kubernetes-preserve-unknown-fields: true
type: array
type: object
type: array
id:
description: ID is the internal keycloak id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,34 @@ spec:
type: integer
groups:
items:
type: string
properties:
attributes:
additionalProperties:
items:
type: string
type: array
type: object
clientRoles:
additionalProperties:
items:
type: string
type: array
type: object
id:
type: string
name:
type: string
path:
type: string
realmRoles:
items:
type: string
type: array
subGroups:
items:
x-kubernetes-preserve-unknown-fields: true
type: array
type: object
type: array
id:
description: ID is the internal keycloak id
Expand Down

0 comments on commit 9042bf7

Please sign in to comment.