Skip to content

get_store should have an optional store_id parameter #9

@misterflop

Description

@misterflop

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 openfga/sdk-generator#118


We should do something similar to what @jimmyjames mentions here:
openfga/java-sdk#150 (comment)

  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    On deck

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions