Closed sinclairs closed 1 year ago
Thanks for noticing and opening this issue, I think you're right, that particular doc example is out of date! We'll fix this and see if there's any similar references.
Also, the api seems to differ between languages setEvaluationContext vs setContext
Yes, the spec doesn't dictate exact method names, we leave some amount of flexibility to allow for language idioms, etc. I don't think resolving this particular inconsistency would be worth a breaking change in an SDK.
Yes, the spec doesn't dictate exact method names, we leave some amount of flexibility to allow for language idioms, etc. I don't think resolving this particular inconsistency would be worth a breaking change in an SDK.
Fair enough. I was just thinking of a scenario where you'd want to use the respective SDKs for the browser and server. Consistent naming would perhaps be beneficial, rather than setContext
in the browser, then setEvaluationContext
on the server. Just a thought.
Change in the documentation
Thanks for the effort that's being put in to this. I'm new to OpenFeature, but the docs appear to be incorrect.
I think the examples should be using
setContext
rather than setting acontext
property directly e.g.OpenFeature.context = { myGlobalKey: 'myGlobalValue' }
(this line)would be:
OpenFeature.setContext({ myGlobalKey: 'myGlobalValue' });
If a property should be set directly, then only
_context
seems to work, note the preceding_
.Also, the api seems to differ between languages
setEvaluationContext
vssetContext
🤔