Remove client side validation in the Python SDK
Closed this issue · 1 comments
Checklist
- I agree to the terms within the OpenFGA Code of Conduct.
Describe the problem you'd like to have solved
We currently have client side validation in the Python SDK that is based on the OpenAPI specification from the proto definition files.
It handles things such as:
- Validating min/max length of strings
- Validating min/max size of arrays
We are considering to remove this from the SDK for the following reasons:
- Some settings can be configured at the server level so the validation in the SDK might not always be correct
- If the validation ever changes, it required new SDK releases
- Python is the only SDK that supports this, and we do not plan to introduce it to other SDKs
Important
We believe we should not remove validation of required values as that is beneficial to keep. We only wish to remove validation of values themselves (i.e. "is this array size greater than 1 and less than 100")
Describe the ideal solution
Any validation of values other than required values is removed from the Python generator template.
This is mostly contained with the model.mustache
file but also look for any instances of client_side_validation
and disabled_client_side_validations
to ensure all traces are removed.
Alternatives and current workarounds
We considered adding this into other SDKs but we decided that given the investment needed this was not the right choice
References
No response
Additional context
No response
Done in #457