Skip to content

Conversation

@thomaspoignant
Copy link
Member

Add a new method called asObjectMap that convert the EvaluationContext into a Map<String,Object>.

This utility method will be used by the providers when they have to convert the EvaluationContext to transform them into the query they need to send to the backend system.

@thomaspoignant thomaspoignant changed the title Add asObjectMap to get the EvaluationContext as Map<String,Object> feat: Add asObjectMap to get the EvaluationContext as Map<String,Object> Sep 16, 2022
@thomaspoignant thomaspoignant requested review from justinabrahms and removed request for rgrassian-split September 16, 2022 14:02
@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2022

Codecov Report

Merging #75 (7f96af5) into main (5db90f1) will decrease coverage by 0.08%.
The diff coverage is 90.32%.

@@             Coverage Diff              @@
##               main      #75      +/-   ##
============================================
- Coverage     91.32%   91.24%   -0.09%     
- Complexity      162      173      +11     
============================================
  Files            19       19              
  Lines           346      377      +31     
  Branches         16       22       +6     
============================================
+ Hits            316      344      +28     
- Misses           21       22       +1     
- Partials          9       11       +2     
Flag Coverage Δ
unittests 91.24% <90.32%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...c/main/java/dev/openfeature/javasdk/Structure.java 92.85% <90.32%> (-3.15%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@justinabrahms justinabrahms enabled auto-merge (squash) September 16, 2022 14:15
Copy link
Member

@agentgonzo agentgonzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine be me from a provider's standpoint. But I can remember that @justinabrahms wanted to keep typing around as much as possible.

@justinabrahms justinabrahms merged commit 2eec1a5 into open-feature:main Sep 16, 2022
@toddbaert
Copy link
Member

I think this is a good improvement. If this method is used it sacrifices some type safety, but easily allows people to use things like ObjectMapper without implementing this boilerplate.

@thomaspoignant thomaspoignant deleted the add-as-objectmap branch September 16, 2022 14:21
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.

5 participants