43 references to OpenApiOptions
Microsoft.AspNetCore.OpenApi (43)
Extensions\OpenApiEndpointRouteBuilderExtensions.cs (2)
28
var options = endpoints.ServiceProvider.GetRequiredService<IOptionsMonitor<
OpenApiOptions
>>();
53
var
documentOptions = options.Get(lowercasedDocumentName);
Extensions\OpenApiServiceCollectionExtensions.cs (5)
44
/// <param name="configureOptions">A delegate used to configure the target <see cref="
OpenApiOptions
"/>.</param>
56
public static IServiceCollection AddOpenApi(this IServiceCollection services, string documentName, Action<
OpenApiOptions
> configureOptions)
67
services.Configure<
OpenApiOptions
>(lowercasedDocumentName, options =>
79
/// <param name="configureOptions">A delegate used to configure the target <see cref="
OpenApiOptions
"/>.</param>
91
public static IServiceCollection AddOpenApi(this IServiceCollection services, Action<
OpenApiOptions
> configureOptions)
Services\IOpenApiDocumentProvider.cs (1)
24
/// Any OpenAPI transformers registered in the <see cref="
OpenApiOptions
"/> instance associated with
Services\OpenApiDocumentProvider.cs (2)
28
var options = serviceProvider.GetRequiredService<IOptionsMonitor<
OpenApiOptions
>>();
29
var
namedOption = options.Get(lowercasedDocumentName);
Services\OpenApiDocumentService.cs (2)
37
IOptionsMonitor<
OpenApiOptions
> optionsMonitor,
41
private readonly
OpenApiOptions
_options = optionsMonitor.Get(documentName);
Services\OpenApiOptions.cs (29)
27
/// Initializes a new instance of the <see cref="
OpenApiOptions
"/> class
41
/// The name of the OpenAPI document this <see cref="
OpenApiOptions
"/> instance is associated with.
60
/// Registers a new document transformer on the current <see cref="
OpenApiOptions
"/> instance.
63
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
64
public
OpenApiOptions
AddDocumentTransformer<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TTransformerType>()
72
/// Registers a given instance of <see cref="IOpenApiDocumentTransformer"/> on the current <see cref="
OpenApiOptions
"/> instance.
75
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
76
public
OpenApiOptions
AddDocumentTransformer(IOpenApiDocumentTransformer transformer)
85
/// Registers a given delegate as a document transformer on the current <see cref="
OpenApiOptions
"/> instance.
88
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
89
public
OpenApiOptions
AddDocumentTransformer(Func<OpenApiDocument, OpenApiDocumentTransformerContext, CancellationToken, Task> transformer)
98
/// Registers a new operation transformer on the current <see cref="
OpenApiOptions
"/> instance.
101
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
102
public
OpenApiOptions
AddOperationTransformer<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TTransformerType>()
110
/// Registers a given instance of <see cref="IOpenApiOperationTransformer"/> on the current <see cref="
OpenApiOptions
"/> instance.
113
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
114
public
OpenApiOptions
AddOperationTransformer(IOpenApiOperationTransformer transformer)
123
/// Registers a given delegate as an operation transformer on the current <see cref="
OpenApiOptions
"/> instance.
126
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
127
public
OpenApiOptions
AddOperationTransformer(Func<OpenApiOperation, OpenApiOperationTransformerContext, CancellationToken, Task> transformer)
136
/// Registers a new schema transformer on the current <see cref="
OpenApiOptions
"/> instance.
139
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
140
public
OpenApiOptions
AddSchemaTransformer<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TTransformerType>()
148
/// Registers a given instance of <see cref="IOpenApiOperationTransformer"/> on the current <see cref="
OpenApiOptions
"/> instance.
151
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
152
public
OpenApiOptions
AddSchemaTransformer(IOpenApiSchemaTransformer transformer)
161
/// Registers a given delegate as a schema transformer on the current <see cref="
OpenApiOptions
"/> instance.
164
/// <returns>The <see cref="
OpenApiOptions
"/> instance for further customization.</returns>
165
public
OpenApiOptions
AddSchemaTransformer(Func<OpenApiSchema, OpenApiSchemaTransformerContext, CancellationToken, Task> transformer)
Services\Schemas\OpenApiSchemaService.cs (1)
32
IOptionsMonitor<
OpenApiOptions
> optionsMonitor)
Transformers\OpenApiDocumentTransformerContext.cs (1)
34
/// in this document, use <see cref="
OpenApiOptions
.ShouldInclude"/> to filter the descriptions.