get_store should have an optional store_id parameter
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 85
- Forks
- 36
- Avg merge
- 3h 8m
- Merged PRs (30d)
- 3
Description
In the current implementation, get_store return the OpenFGA store specified in the client_api configuration.
Except by listing all the stores with list_stores, I don't see any other way to get a specific store different of the one defined in the configuration.
A way to arrange that would be to add an optional store_id parameter to get_store.
Part of https://github.com/openfga/sdk-generator/issues/118
We should do something similar to what @jimmyjames mentions here:
https://github.com/openfga/java-sdk/issues/150#issuecomment-2666996341
- for requests that use the storeId in the path, update the request options object to include a
storeId- In
OpenFgaClient, if the options are not null andstoreIdis non-null and non-empty, use that to build the path. Otherwise, use thestoreIdconfigured on the client- Update the tests to verify that the
storeIdcan be overridden per request, and that the value on the client is used if not overridden.
In general, it should be pretty similar to how the
authorizationModelIdis allowed to be overridden per request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OpenFgaClient.get_store and the request options used by client methods. Compare the existing authorizationModelId override behavior, then inspect the related tests to verify that a per-request storeId overrides the configured store and that the configured value remains the fallback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100