From a5b0f9c4200b1e8d3a6ef05525f892a1ccbb4957 Mon Sep 17 00:00:00 2001 From: Fabrizio Demaria Date: Thu, 1 Jun 2023 12:25:26 +0200 Subject: [PATCH] Add more Reasons according to specs --- Sources/OpenFeature/Reason.swift | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Sources/OpenFeature/Reason.swift b/Sources/OpenFeature/Reason.swift index 5da58fb..c1642f7 100644 --- a/Sources/OpenFeature/Reason.swift +++ b/Sources/OpenFeature/Reason.swift @@ -1,14 +1,18 @@ import Foundation public enum Reason: String { - /// The resolved value was the result of the flag being disabled in the management system. - case disabled - /// The resolved value was the result of pseudorandom assignment. - case split - /// The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. - case targetingMatch + /// The resolved value is static (no dynamic evaluation). + case staticReason /// The resolved value was configured statically, or otherwise fell back to a pre-configured value. case defaultReason + /// The resolved value was the result of a dynamic evaluation, such as a rule or specific user-targeting. + case targetingMatch + /// The resolved value was the result of pseudorandom assignment. + case split + /// The resolved value was retrieved from cache. + case cached + /// The resolved value was the result of the flag being disabled in the management system. + case disabled /// The reason for the resolved value could not be determined. case unknown /// The resolved value is non-authoritative or possible out of date