-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: get variation details by variation type #155
Conversation
@duyhungtnn, please fix the conflicts. |
984576f
to
31982a5
Compare
@cre8ivejp I fixed the conflict and updated this PR with new changes from the |
|
src/JsonTypes.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT of renaming the file name to BKTJsonTypes
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could better if named as BKTValue like Android & iOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it 14c24ac
The e2e tests are failing. Can you check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Related bucketeer-io/bucketeer#886
Changes
BKTValue
to hold all valid types that could used on the interface. (refs from OpenFeature SDK interface)BKTEvaluationDetail<BKTValue>
to support getting variation details by type.evaluationDetails
will be deprecated after this PR.Breaking changes
This PR introduces breaking changes on the method
jsonVariation
. The previous logic could return any type but we don't allow it anymore.The returned value will be either a
BKTJsonObject
or aBKTJsonArray
. If no result is found, it will return the provideddefaultValue
, which can be of any type withinBKTJsonValue
.Also this method
jsonVariation
is marked as deprecated and the user should useobjectVariation
instead.It is not removed to prevent build failures in the current project that uses this method.