title: How to mask any parameter inside auto generated swagger java class
body: <p>How to mask any parameter in auto generated swagger java class ?<br>
  If manual getter setter class we can edit toString method but in autogenerated class it will generate swagger pojo class on each build so how to modify toString method which is autogenerated by swagger ? </p>
  
  <p>Below is the code</p>
  
  <p><strong>api.yml</strong> ( which is generating POJO class through swagger)</p>
  
  <pre><code>InsuredDTO:
  type: object
  properties:
    id:
      type: integer
      format: int64
    name:
      type: string
    nric:
      type: string
  </code></pre>
  
  <p><strong>toString</strong> Method inside auto generate POJO class</p>
  
  <pre><code>@Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class InsuredDTO {\n");
  
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    nric: ").append(toIndentedString(nric)).append("\n");
    sb.append("}");
    return sb.toString();
  }
  </code></pre>
  
  <p>Adding some logs inside <strong>LoggingAspect</strong> class</p>
  
  <pre><code>log.debug("Enter: {}.{}() with argument[s] = {}", joinPoint.getSignature().getDeclaringTypeName(),
              joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs()));
  </code></pre>
  
  <p>In this log <code>joinPoint.getArgs()</code> is having complete toString data with Id name and nric, here I want to display <strong>masked nric</strong> instead of direct <strong>nric</strong> value.</p>
  
  <p>If it is not auto generated class then we can add something like below in toString method.</p>
  
  <pre><code>sb.append("nric: ").append("********").append("\n");
  </code></pre>
  
  <p>But in this case of auto generated class is there any way to mask any property only for logging purpose ?</p>
  
  <p>I have tried with flag in yml file as below</p>
  
  <pre><code>properties:
    id:
      type: integer
      format: int64
    nric:
      type: string
      format: password
  </code></pre>
  
  <p>But this one also not formating the property in expected way.</p>