Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-34798

Handle message validation in middleware

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • None

      Currently validation using protoc-gen-validate doesn't always recursively validate embedded sub-messages. Moving validation to middleware, removes needing to add validateAll() checks to each service individually can be handled in one place for all services. Only requirement for adding validation would be writing the rules in the proto files.

       

      This could be addressed:

      • By upgrading to [protovalidate|https://github.com/bufbuild/protovalidate], which seems to be the general guidance. It looks like it's in beta, but it says up top that it's recommended for new projects, and it's based on reflection rather than code generation, which shouldn't fall into this kind of issue.

            rh-ee-jmarcant Jonathan Marcantonio
            rh-ee-jmarcant Jonathan Marcantonio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: