openfga / openfga/python-sdk

get_store should have an optional store_id parameter

Offen
#9 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

enhancement
Vorherrschende Sprache
Python
Sterne
85
Forks
36
Ø Merge
3 Std. 8 Min.
Gemergte PRs (30 T.)
3

Beschreibung

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 and storeId is non-null and non-empty, use that to build the path. Otherwise, use the storeId configured on the client
  • Update the tests to verify that the storeId can 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 authorizationModelId is allowed to be overridden per request.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit OpenFgaClient.get_store und den von Client-Methoden verwendeten Request-Optionen. Vergleiche das bestehende Überschreibungsverhalten von authorizationModelId und prüfe anschließend die zugehörigen Tests, um zu verifizieren, dass ein storeId pro Request den konfigurierten Store überschreibt und der konfigurierte Wert als Fallback erhalten bleibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.