title: NSwag generates base class even though JsonSchemaFlattenAttribute is set
body: <p>I am using NSwag for my ASP.NET Core web api project and just can't get it to work. What I'm trying to do is to exclude some of the base properties of <strong>IdentityUser</strong>. Here is my custom user class:</p>
  <pre><code>[DataContract]
  [JsonSchemaFlattenAttribute]
  public class User : IdentityUser
  {
      // Overridden variables
      [DataMember( Name = &quot;id&quot; )]
      [PersonalData]
      public new string Id { get; set; }
  
      [DataMember( Name = &quot;email&quot; )]
      [ProtectedPersonalData]
      public new string Email { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new DateTimeOffset? LockoutEnd { get; set; }
  
      [PersonalData]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new bool TwoFactorEnabled { get; set; }
  
      [PersonalData]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new bool PhoneNumberConfirmed { get; set; }
  
      [ProtectedPersonalData]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string PhoneNumber { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string ConcurrencyStamp { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string SecurityStamp { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string PasswordHash { get; set; }
  
      [PersonalData]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new bool EmailConfirmed { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string NormalizedEmail { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string NormalizedUserName { get; set; }
  
      [ProtectedPersonalData]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new string UserName { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new bool LockoutEnabled { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public new int AccessFailedCount { get; set; }
  
      // Custom variables
      [DataMember( Name = &quot;date_joined_utc&quot; )]
      public DateTime DateJoinedUtc { get; set; }
  
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public virtual ICollection&lt;RefreshToken&gt; RefreshTokens { get; set; }
  
      // Optimistic concurrency
      [Timestamp]
      [IgnoreDataMember]
      [JsonSchemaIgnoreAttribute]
      public byte[] RowVersion { get; set; }
  }
  </code></pre>
  <p>Which generates:</p>
  <pre><code>&quot;User&quot;: {
    &quot;type&quot;: &quot;object&quot;,
    &quot;required&quot;: [
      &quot;dateJoinedUtc&quot;
    ],
    &quot;properties&quot;: {
      &quot;id&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;email&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;dateJoinedUtc&quot;: {
        &quot;type&quot;: &quot;string&quot;,
        &quot;format&quot;: &quot;date-time&quot;
      }
    },
    &quot;allOf&quot;: [
      {
        &quot;$ref&quot;: &quot;#/definitions/IdentityUserOfString&quot;
      },
      {}
    ]
  },
  &quot;IdentityUserOfString&quot;: {
    &quot;type&quot;: &quot;object&quot;,
    &quot;required&quot;: [
      &quot;emailConfirmed&quot;,
      &quot;phoneNumberConfirmed&quot;,
      &quot;twoFactorEnabled&quot;,
      &quot;lockoutEnabled&quot;,
      &quot;accessFailedCount&quot;
    ],
    &quot;properties&quot;: {
      &quot;id&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;userName&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;normalizedUserName&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;email&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;normalizedEmail&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;emailConfirmed&quot;: {
        &quot;type&quot;: &quot;boolean&quot;
      },
      &quot;passwordHash&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;securityStamp&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;concurrencyStamp&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;phoneNumber&quot;: {
        &quot;type&quot;: &quot;string&quot;
      },
      &quot;phoneNumberConfirmed&quot;: {
        &quot;type&quot;: &quot;boolean&quot;
      },
      &quot;twoFactorEnabled&quot;: {
        &quot;type&quot;: &quot;boolean&quot;
      },
      &quot;lockoutEnd&quot;: {
        &quot;type&quot;: &quot;string&quot;,
        &quot;format&quot;: &quot;date-time&quot;
      },
      &quot;lockoutEnabled&quot;: {
        &quot;type&quot;: &quot;boolean&quot;
      },
      &quot;accessFailedCount&quot;: {
        &quot;type&quot;: &quot;integer&quot;,
        &quot;format&quot;: &quot;int32&quot;
      }
    }
  },
  </code></pre>
  <p>My understanding of <strong>JsonSchemaFlattenAttribute</strong> is that it should exclude the base classes and put every property in the derived class. So why is the class <strong>IdentityUserOfString</strong> generated? What am I missing?</p>