title: How to configure Swashbuckle to ignore property on model
body: <p>I'm using Swashbuckle to generate swagger documentation\UI for a webapi2 project.  Our models are shared with some legacy interfaces so there are a couple of properties I want to ignore on the models.  I can't use JsonIgnore attribute because the legacy interfaces also need to serialize to JSON so I don't want to ignore the properties globally, just in the Swashbuckle configuration.</p>
  
  <p>I found a method of doing this documented here:</p>
  
  <p><a href="https://github.com/domaindrivendev/Swashbuckle/issues/73" rel="noreferrer">https://github.com/domaindrivendev/Swashbuckle/issues/73</a></p>
  
  <p>But this appears to be out of date with the current Swashbuckle release. </p>
  
  <p>The method recommended for the old version of Swashbuckle is using an IModelFilter implementation as follows:</p>
  
  <pre><code>public class OmitIgnoredProperties : IModelFilter
  {
      public void Apply(DataType model, DataTypeRegistry dataTypeRegistry, Type type)
      {
          var ignoredProperties = … // use reflection to find any properties on 
                                    // type decorated with the ignore attributes
  
          foreach (var prop in ignoredProperties) 
              model.Properties.Remove(prop.Name);
  
      }
  }
  
  SwaggerSpecConfig.Customize(c =&gt; c.ModelFilter&lt;OmitIgnoredProperties&gt;());
  </code></pre>
  
  <p>But I'm unsure how to configure Swashbuckle to use the IModelFilter in the current version?  I'm using Swashbuckle 5.5.3. </p>