Skip to content

Conversation

@fabriziodemaria
Copy link
Member

@fabriziodemaria fabriziodemaria commented Jun 25, 2025

Following up the work from #191

Changes

  • Address the open question from the original PR: how to handle mismatches between the default value and the remote value.
    • Following the most common approach in the industry, we never merge values: either all the non-optional fields are populated from remote or the default value is returned as-is.
  • Add OpenFeature compatibility for object evaluations

Detailed resolve behaviour

  • More fields in the remote value are allowed and discarded
  • More fields in the default value are not allowed and the entire resolve is default value
  • Any type mismatch on the same field is not allowed and the entire resolve is default value

More nuances:

  • Optional fields in the default value don't need to be in the remote value
  • Nulls fields in the remote value should be mapped to default values fields (currently broken, the entire resolve is default value)

Gotchas

  • Date and DateComponents are returned as String, and should be defined as String in the passed in Codable T

@fabriziodemaria fabriziodemaria changed the title feat: pass Decodable struct to flag evaluation cont'd feat: pass Decodable struct to flag evaluation (cont'd) Jun 25, 2025
@fabriziodemaria fabriziodemaria force-pushed the codable-evaluations branch 2 times, most recently from 567e358 to c3cf083 Compare June 25, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants