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

Remove client side validation in the Python SDK #450

Open
1 task done
ewanharris opened this issue Nov 6, 2024 · 0 comments
Open
1 task done

Remove client side validation in the Python SDK #450

ewanharris opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ewanharris
Copy link
Member

Checklist

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

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

No branches or pull requests

1 participant