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!: remove store ID from API config, allow override per-request #101

Merged
merged 4 commits into from
May 30, 2024

Conversation

jimmyjames
Copy link
Contributor

@jimmyjames jimmyjames commented May 29, 2024

Removes StoreId from api_open_fga.go configuration, and enables per-request override of the StoreId.

Description

⚠️ Breaking change ⚠️

Removes the StoreId from the API client, and instead accept the StoreId as a parameter. As discussed in #118, this allows for the removal of the custom patch during SDK generation.

If using api_open_fga.go directly, you will now need to pass the StoreId parameter.

This change also enables per-request override of the StoreId, via the associated request's options.

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

@jimmyjames jimmyjames requested review from a team as code owners May 29, 2024 01:52
@codecov-commenter
Copy link

codecov-commenter commented May 29, 2024

Codecov Report

Attention: Patch coverage is 41.17647% with 280 lines in your changes are missing coverage. Please review.

Project coverage is 23.53%. Comparing base (4d3ff71) to head (76513bf).

Files Patch % Lines
api_open_fga.go 17.18% 177 Missing and 11 partials ⚠️
model_unauthenticated_response.go 0.00% 70 Missing ⚠️
client/client.go 87.70% 14 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
+ Coverage   22.54%   23.53%   +0.98%     
==========================================
  Files          94       95       +1     
  Lines        9754     9948     +194     
==========================================
+ Hits         2199     2341     +142     
- Misses       7304     7357      +53     
+ Partials      251      250       -1     

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

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.

Nice work! Changes in general look good, just the one callout where we're dropping #93 as it wasn't backported. Maybe we can merge openfga/sdk-generator/pull/365 and regenerate these changes?

README.md Outdated Show resolved Hide resolved
client/client.go Outdated Show resolved Hide resolved
@jimmyjames jimmyjames requested review from ewanharris and rhamzeh May 29, 2024 20:46
@jimmyjames jimmyjames added this pull request to the merge queue May 30, 2024
Merged via the queue into main with commit 392f47a May 30, 2024
9 checks passed
@jimmyjames jimmyjames deleted the feat/store-id-override branch May 30, 2024 16:07
@jimmyjames jimmyjames mentioned this pull request May 30, 2024
4 tasks
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