Questions around API design for Client's generate_tenant_token
method's UID parameter
#488
Labels
enhancement
New feature or request
Description
I would like to open a discussion on the API design decision around the Client's
generate_tenant_token
method's UID parameter. Since theDiscussions
feature is not enabled for this repo, I had to open it as an issue instead.Currently in the SDK v0.24.1 the Client's
generate_tenant_token
methos is implemented as follows:By accepting a
String
, as an API consumer what this signature tells me is that I can pass any string which would uniquely identify the tenant token to be generated.Unfortunately, this assumption is broken downstream by the following implementation detail in the
tenant_tokens
module:Here the api_key_uid is parsed into a
Uuid
and, if the parsing fails, the whole tenant token generation will fail with a Uuid error.Expected behavior
A more coherent API experience. The API should clearly communicate to the consumers what does it expect from them.
Current behavior
If a non-Uuid string is passed, an error is returned.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: