Skip to content

Commit

Permalink
sdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
Remco Lam committed Apr 26, 2024
1 parent 438158a commit 3c27f55
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,23 @@ public static void SupportNonNullableReferenceTypes(this SwaggerGenOptions swagg
});
}

/// <summary>
/// Extend the Swagger Generator with "filters" that can modify Schemas after they're initially generated
/// </summary>
/// <typeparam name="TFilter">A type that derives from IDocumentFilter</typeparam>
/// <param name="swaggerGenOptions"></param>
/// <param name="filterInstance">An instance of the filter, to enable reuse.</param>
public static void AddSchemaFilterInstance<TFilter>(
this SwaggerGenOptions swaggerGenOptions,
TFilter filterInstance)
where TFilter : IDocumentFilter
{
swaggerGenOptions.DocumentFilterDescriptors.Add(new FilterDescriptor
{
FilterInstance = filterInstance
});
}

/// <summary>
/// Extend the Swagger Generator with "filters" that can modify Parameters after they're initially generated
/// </summary>
Expand All @@ -361,6 +378,8 @@ public static void SupportNonNullableReferenceTypes(this SwaggerGenOptions swagg
});
}

xxxxxx

/// <summary>
/// Extend the Swagger Generator with "filters" that can modify RequestBodys after they're initially generated
/// </summary>
Expand All @@ -379,6 +398,8 @@ public static void SupportNonNullableReferenceTypes(this SwaggerGenOptions swagg
});
}

xxxxxx

/// <summary>
/// Extend the Swagger Generator with "filters" that can modify Operations after they're initially generated
/// </summary>
Expand Down

0 comments on commit 3c27f55

Please sign in to comment.