openfga / openfga/python-sdk

get_store should have an optional store_id parameter

オープン
#9 コメント 8 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
Python
スター
85
フォーク
36
平均マージ
3時間 8分
マージ済み PR(30日)
3

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

OpenFgaClient.get_store から始め、クライアントメソッドで使用されるリクエストオプションを確認します。既存の authorizationModelId のオーバーライド動作を比較し、関連するテストを調べて、リクエストごとの storeId が設定済みのストアを上書きし、設定済みの値がフォールバックとして残ることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。