From 5ef1557d4214c0887df2a643a0af0efab84bd0f4 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sat, 18 Apr 2026 13:12:23 +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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/v1/types_authentication.go b/config/v1/types_authentication.go index 52a41b2fef2..11efc90b598 100644 --- a/config/v1/types_authentication.go +++ b/config/v1/types_authentication.go @@ -672,7 +672,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 = "" @@ -723,7 +723,7 @@ type PrefixedClaimMapping struct { type TokenValidationRuleType string const ( - TokenValidationRuleTypeRequiredClaim = "RequiredClaim" + TokenValidationRuleTypeRequiredClaim TokenValidationRuleType = "RequiredClaim" ) type TokenClaimValidationRule struct {