Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing of flag values #22

Closed
dabeeeenster opened this issue Mar 18, 2022 · 2 comments
Closed

Typing of flag values #22

dabeeeenster opened this issue Mar 18, 2022 · 2 comments

Comments

@dabeeeenster
Copy link
Contributor

Most providers also allow for flags to return some sort of value as well as a boolean.

How these values are typed can be problematic, as you have to be aware of the consistency of types and coercion across languages that are both strongly and weakly typed. How flag values are typed should be part of the spec, I feel.

There is a similar issue around user properties. Many providers allow for user properties/meta data to provide context to the flag engine. Again, how these values are typed needs to be considered.

@toddbaert
Copy link
Member

I agree that flag value typing should be defined in the spec, and that we need to do our best to come up with a cross-language solution for this problem. Somewhat relevant to this discussion is the recently merged doc here: https://github.com/open-feature/spec/blob/main/research/api-comparision.md#types

It seems to me that many of the sampled vendors have type-specific methods/functions for some amount of type safety, and presumably to validate that the retrieved value is of the expected type. I believe @agentgonzo has some sensible opinions on this. I'll do some more research and respond here with some ideas.

@beeme1mr
Copy link
Member

I'll close this issue now that we have a proposal in place. @dabeeeenster your feedback on @toddbaert's proposal would be very much appreciated.

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

No branches or pull requests

3 participants