Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5423

Support parameter validation in IDL

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Build Process
    • Flags:
      Important

      Description

      I 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), benefiting from its strong plugin mechanism. If we can use build tools to generate codes for simple and unchangeable constraint, the web service will be more robust and developers will benefit from lighter work. Take a long-term view, auto-generated parameter validation may be a step towards code-less web services.
      Here I propose the Validation Annotation for meeting this need.
       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aster duanyi

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 672h
                672h
                Remaining:
                Remaining Estimate - 670h 20m
                670h 20m
                Logged:
                Remaining Estimate - 670h 20m
                1h 40m

                  Issue deployment