Skip to content

Commit 1a12eb6

Browse files
committed
Update docs for OpenAPI parameter registration
Expanded and clarified XML docs for OpenAPI/Swagger parameter methods, added <seealso> tags, and improved summaries. Added links to related package documentation in README.md.
1 parent b02b1b4 commit 1a12eb6

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ dotnet add package TinyHelpers
2929

3030
Or search for `TinyHelpers` in the Visual Studio Package Manager.
3131

32+
## Other package documentation
33+
34+
Additional documentation is available for these packages:
35+
36+
- [TinyHelpers.AspNetCore](src/TinyHelpers.AspNetCore/README.md)
37+
- [TinyHelpers.AspNetCore.Swashbuckle](src/TinyHelpers.AspNetCore.Swashbuckle/README.md)
38+
- [TinyHelpers.EntityFrameworkCore](src/TinyHelpers.EntityFrameworkCore/README.md)
39+
- [TinyHelpers.Dapper](src/TinyHelpers.Dapper/README.md)
40+
3241
## Contents
3342

3443
- [Collections and sequences](#collections-and-sequences)

src/TinyHelpers.AspNetCore.Swashbuckle/SwaggerExtensions.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,20 @@ public void AddTimeSpanTypeMapping(string? example)
4949
}
5050

5151
/// <summary>
52-
/// Adds a shared parameter definition pipeline to Swagger generation.
52+
/// Adds shared OpenAPI parameter definitions so they are automatically applied to every generated operation.
5353
/// </summary>
54+
/// <seealso cref="AddSwaggerOperationParameters(IServiceCollection, Action{OpenApiOperationOptions})"/>
5455
public void AddOperationParameters()
5556
=> options.OperationFilter<OpenApiParametersOperationFilter>();
5657
}
5758

5859
/// <summary>
59-
/// Registers a reusable set of OpenAPI parameters in the dependency injection container.
60+
/// Registers OpenAPI parameter definitions that can be automatically applied to every operation.
6061
/// </summary>
61-
/// <remarks>
62-
/// This lets applications define shared parameters once and then reuse them during Swagger
63-
/// generation through <see cref="OpenApiParametersOperationFilter" />.
64-
/// </remarks>
6562
/// <param name="services">The service collection to extend.</param>
6663
/// <param name="setupAction">The configuration callback used to populate shared parameters.</param>
6764
/// <returns>The same <see cref="IServiceCollection" /> instance so calls can be chained.</returns>
65+
/// <seealso cref="AddOperationParameters(SwaggerGenOptions)"/>
6866
public static IServiceCollection AddSwaggerOperationParameters(this IServiceCollection services, Action<OpenApiOperationOptions> setupAction)
6967
{
7068
ArgumentNullException.ThrowIfNull(services);

src/TinyHelpers.AspNetCore/OpenApi/OpenApiExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ public static class OpenApiExtensions
1414
extension(IServiceCollection services)
1515
{
1616
/// <summary>
17-
/// Captures endpoint parameter metadata once and reuses it during OpenAPI generation so the application can keep custom parameter rules in a single place.
17+
/// Registers OpenAPI parameter definitions that can be automatically applied to every operation.
1818
/// </summary>
1919
/// <param name="setupAction">A callback that fills the parameter options object.</param>
2020
/// <returns>The same <see cref="IServiceCollection" /> for fluent registration.</returns>
21+
/// <seealso cref="AddOperationParameters(OpenApiOptions)"/>
2122
public IServiceCollection AddOpenApiOperationParameters(Action<OpenApiOperationOptions> setupAction)
2223
{
2324
ArgumentNullException.ThrowIfNull(services);
@@ -56,9 +57,10 @@ public OpenApiOptions AddDefaultProblemDetailsResponse()
5657
}
5758

5859
/// <summary>
59-
/// Adds custom query-parameter metadata rules when the default generated names are not sufficient.
60+
/// Adds shared OpenAPI parameter definitions so they are automatically applied to every generated operation.
6061
/// </summary>
6162
/// <returns>The same <see cref="OpenApiOptions" /> for fluent configuration.</returns>
63+
/// <seealso cref="AddOpenApiOperationParameters(IServiceCollection, Action{OpenApiOperationOptions})"/>
6264
public OpenApiOptions AddOperationParameters()
6365
=> options.AddOperationTransformer<OpenApiParametersOperationFilter>();
6466

0 commit comments

Comments
 (0)