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

feat: add support for specifying consistency parameter #70

Merged
merged 5 commits into from
Aug 23, 2024

Conversation

rhamzeh
Copy link
Member

@rhamzeh rhamzeh commented Jul 31, 2024

Adds support for specifying the consistency parameter.

Description

Supports the ability to specify the consistency parameter for those endpoints that accept it (read, check, list users, list objects, and expand).

Note that a change to JsonStringEnumMemberConverter is also required to support the new enum UNSPECIFIED along with its EnumMember value (also UNSPECIFIED). Otherwise, there are errors when attempting to add the same key twice to the dictionary.

In addition to the included unit tests, manual testing was also done using the example application to verify that the enum changes work as expected, and that the consistency parameter is being sent.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

@rhamzeh rhamzeh changed the title Feat/consistency parameter feat: ass support for specifying consistency parameter Jul 31, 2024
@rhamzeh rhamzeh changed the title feat: ass support for specifying consistency parameter feat: ad support for specifying consistency parameter Jul 31, 2024
@rhamzeh rhamzeh changed the title feat: ad support for specifying consistency parameter feat: add support for specifying consistency parameter Jul 31, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 47.69231% with 34 lines in your changes missing coverage. Please review.

Project coverage is 31.15%. Comparing base (5e08694) to head (fe663b4).

Files Patch % Lines
src/OpenFga.Sdk/Model/CheckRequest.cs 12.50% 7 Missing ⚠️
src/OpenFga.Sdk/Model/ListObjectsRequest.cs 12.50% 7 Missing ⚠️
src/OpenFga.Sdk/Model/ListUsersRequest.cs 12.50% 7 Missing ⚠️
src/OpenFga.Sdk/Model/ReadRequest.cs 12.50% 7 Missing ⚠️
src/OpenFga.Sdk/Model/ExpandRequest.cs 37.50% 5 Missing ⚠️
...OpenFga.Sdk/Model/JsonStringEnumMemberConverter.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
+ Coverage   30.96%   31.15%   +0.19%     
==========================================
  Files         119      122       +3     
  Lines        6030     6083      +53     
  Branches      784      785       +1     
==========================================
+ Hits         1867     1895      +28     
- Misses       4007     4030      +23     
- Partials      156      158       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jimmyjames jimmyjames force-pushed the feat/consistency-parameter branch from 82a54c7 to fe663b4 Compare August 22, 2024 20:43
@jimmyjames jimmyjames marked this pull request as ready for review August 23, 2024 00:58
@jimmyjames jimmyjames requested review from a team as code owners August 23, 2024 00:58
Copy link
Member

@ewanharris ewanharris left a comment

Choose a reason for hiding this comment

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

Looks good to me, I'd also suggest @rhamzeh takes a look as he's more familiar with the SDK/the issue with the unspecified enum

Copy link
Member Author

@rhamzeh rhamzeh left a comment

Choose a reason for hiding this comment

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

I can't approve my own PR, but ✅ from me. Thanks @jimmyjames!

@jimmyjames jimmyjames added this pull request to the merge queue Aug 23, 2024
Merged via the queue into main with commit f020bc6 Aug 23, 2024
11 checks passed
@jimmyjames jimmyjames deleted the feat/consistency-parameter branch August 23, 2024 20:06
github-merge-queue bot pushed a commit that referenced this pull request Aug 28, 2024
## Release v0.5.0

- feat: support consistency parameter (#70)
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.

4 participants