Ensures the RetryParams class does not permit max_retry to exceed the hardcoded limit of 15 retries, as configured by the SDK Generator.
Includes a new comprehensive unit test file for the SDK's Configuration class, which was not present before. These tests increase our code coverage substantially.
Other small bug fixes and improvements to the Configuration were made, which I noticed as I was writing the unit tests:
disabled_client_side_validations was not working reliably and was unnecessarily using the __setattr__ magic method. This introduced a tiny and unnecessary performance hit when making ANY configuration adjustments. I've created a getter/setter for this property to resolve this.
min_wait_in_ms was not checking for negative values, or indeed if the passed value was an integer at all.
The api_scheme setter was not validating the assigned string as being either HTTP or HTTPS.
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[x] The correct base branch is being used, if not main
[x] I have added tests to validate that the change in functionality is working as expected
Description
This PR:
RetryParams
class does not permitmax_retry
to exceed the hardcoded limit of 15 retries, as configured by the SDK Generator.Other small bug fixes and improvements to the Configuration were made, which I noticed as I was writing the unit tests:
disabled_client_side_validations
was not working reliably and was unnecessarily using the__setattr__
magic method. This introduced a tiny and unnecessary performance hit when making ANY configuration adjustments. I've created a getter/setter for this property to resolve this.min_wait_in_ms
was not checking for negative values, or indeed if the passed value was an integer at all.api_scheme
setter was not validating the assigned string as being either HTTP or HTTPS.References
Review Checklist
main