wrapper.go 391 B

123456789101112
  1. package java
  2. const wrapperConstTpl = `{{ $f := .Field }}{{ $r := .Rules }}
  3. {{- renderConstants (unwrap .) }}`
  4. const wrapperTpl = `{{ $f := .Field }}{{ $r := .Rules }}
  5. if ({{ hasAccessor . }}) {
  6. {{- render (unwrap .) }}
  7. }
  8. {{ if .MessageRules.GetRequired }} else {
  9. throw new io.envoyproxy.pgv.ValidationException("{{ $f }}", "null", "is required");
  10. } {{ end }}`