private Schema FilterSchema(Schema schema, JsonContract jsonContract)
 {
     if (schema.type == "object" || this._applyFiltersToAllSchemas)
     {
         JsonObjectContract jsonObjectContract = jsonContract as JsonObjectContract;
         if (jsonObjectContract != null)
         {
             ModelFilterContext context = new ModelFilterContext(((JsonContract)jsonObjectContract).get_UnderlyingType(), jsonObjectContract, this);
             foreach (IModelFilter modelFilter in this._modelFilters)
             {
                 modelFilter.Apply(schema, context);
             }
         }
         foreach (ISchemaFilter schemaFilter in this._schemaFilters)
         {
             schemaFilter.Apply(schema, this, jsonContract.get_UnderlyingType());
         }
     }
     return(schema);
 }