Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide client service through interfaces to improve decoupling and testability of client application #56

Open
1 task done
bubianchi-criteo opened this issue Apr 22, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@bubianchi-criteo
Copy link

Checklist

Describe the problem you'd like to have solved

I'm prototyping an application that leverages this very useful SDK. To develop our unit tests of my application code, I could not easily simulate and mock specific behaviors in particular for error cases because the OpenFgaClient is provided as a class without overridable methods.

Describe the ideal solution

We could improve the SDK extensibility and client application testability by providing features through interfaces, in particular a IOpenFgaClient interface with the public methods implemented by OpenFgaClient.
Moreover the actual construction of the OpenFga client could be managed through a factory pattern, and with its own interface would enable using natively Dependency Injection from AspNet

Alternatives and current workarounds

No response

References

No response

Additional context

No response

@bubianchi-criteo bubianchi-criteo added the enhancement New feature or request label Apr 22, 2024
@rhamzeh rhamzeh added the good first issue Good for newcomers label Apr 22, 2024
@rhamzeh
Copy link
Member

rhamzeh commented Apr 22, 2024

Thanks for the suggestion @bubianchi-criteo - added to our backlog. Feel free to contribute the change if you are willing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Ready
Development

No branches or pull requests

2 participants