You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "duanyi (Jira)" <ji...@apache.org> on 2021/05/26 04:53:00 UTC

[jira] [Created] (THRIFT-5423) Support parameter validation in IDL

duanyi created THRIFT-5423:
------------------------------

             Summary: Support parameter validation in IDL
                 Key: THRIFT-5423
                 URL: https://issues.apache.org/jira/browse/THRIFT-5423
             Project: Thrift
          Issue Type: Improvement
          Components: Build Process
            Reporter: duanyi
         Attachments: thrift-parameter-validation-proposal.md

We notice that Thrift IDL has no user-defined parameter validating mechanism at present, which is a common need for web services. As for Protobuf, the parameter validation gets community supports like PGV ([protoc-gen-validate|https://github.com/envoyproxy/protoc-gen-validate]), benefiting from its strong plugin mechanism. If we can use build tool to generating codes for simple and unchangeable constraint, the web service will be more robust and developers will benefits from lighter work. Take a long-term view, auto-generated parameter validation may be a step towards code-less web services.
Here we propose the *Validation Annotation* for meeting this need.
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)