From aa35dc1dfd43895b744abee9adf19c33e009edcc Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sat, 18 Apr 2026 12:58:32 +0200 Subject: [PATCH] fix(config/v1): define constants for authentication types as typed constants Without defining the string literals as typed constants the generated openapi schema produces SchemaProps Enum property with an empty list instead of a list of the string literals. --- config/v1/types_authentication.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/v1/types_authentication.go b/config/v1/types_authentication.go index 75e57c3709b..1a036bbb673 100644 --- a/config/v1/types_authentication.go +++ b/config/v1/types_authentication.go @@ -683,7 +683,7 @@ type UsernameClaimMapping struct { // +enum type UsernamePrefixPolicy string -var ( +const ( // NoOpinion let's the cluster assign prefixes. If the username claim is email, there is no prefix // If the username claim is anything else, it is prefixed by the issuerURL NoOpinion UsernamePrefixPolicy = "" @@ -735,10 +735,10 @@ type TokenValidationRuleType string const ( // TokenValidationRuleTypeRequiredClaim indicates that the token must contain a specific claim. // Used as a value for TokenValidationRuleType. - TokenValidationRuleTypeRequiredClaim = "RequiredClaim" + TokenValidationRuleTypeRequiredClaim TokenValidationRuleType = "RequiredClaim" // TokenValidationRuleTypeCEL indicates that the token validation is defined via a CEL expression. // Used as a value for TokenValidationRuleType. - TokenValidationRuleTypeCEL = "CEL" + TokenValidationRuleTypeCEL TokenValidationRuleType = "CEL" ) // TokenClaimValidationRule represents a validation rule based on token claims.