9 implementations of IOpenApiSchemaTransformer
Microsoft.AspNetCore.OpenApi (2)
Transformers\DelegateOpenApiSchemaTransformer.cs (1)
8internal sealed class DelegateOpenApiSchemaTransformer : IOpenApiSchemaTransformer
Transformers\TypeBasedOpenApiSchemaTransformer.cs (1)
11internal sealed class TypeBasedOpenApiSchemaTransformer : IOpenApiSchemaTransformer
Microsoft.AspNetCore.OpenApi.Microbenchmarks (1)
TransformersBenchmark.cs (1)
174private class SchemaTransformer : IOpenApiSchemaTransformer
Microsoft.AspNetCore.OpenApi.Tests (6)
Transformers\OpenApiOptionsTests.cs (1)
196private class TestOpenApiSchemaTransformer : IOpenApiSchemaTransformer
Transformers\SchemaTransformerTests.cs (3)
846private class ActivatedTransformer : IOpenApiSchemaTransformer 858private class DisposableTransformer : IOpenApiSchemaTransformer, IDisposable 876private class AsyncDisposableTransformer : IOpenApiSchemaTransformer, IAsyncDisposable
Transformers\TypeBasedTransformerLifetimeTests.cs (2)
339private class ActivatedSchemaTransformer : IOpenApiSchemaTransformer 357private class ActivatedSchemaTransformerWithDependency: IOpenApiSchemaTransformer
31 references to IOpenApiSchemaTransformer
Microsoft.AspNetCore.OpenApi (26)
Services\OpenApiDocumentService.cs (14)
66IOpenApiSchemaTransformer[] schemaTransformers = _options.SchemaTransformers.Count > 0 67? new IOpenApiSchemaTransformer[_options.SchemaTransformers.Count] 68: Array.Empty<IOpenApiSchemaTransformer>(); 109internal void InitializeTransformers(IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, IOpenApiOperationTransformer[] operationTransformers) 138internal static async Task FinalizeTransformers(IOpenApiSchemaTransformer[] schemaTransformers, IOpenApiOperationTransformer[] operationTransformers) 218IOpenApiSchemaTransformer[] schemaTransformers, 239IOpenApiSchemaTransformer[] schemaTransformers, 273IOpenApiSchemaTransformer[] schemaTransformers, 322IOpenApiSchemaTransformer[] schemaTransformers, 356IOpenApiSchemaTransformer[] schemaTransformers, 394IOpenApiSchemaTransformer[] schemaTransformers, 460private async Task<OpenApiRequestBody?> GetRequestBodyAsync(ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 483IOpenApiSchemaTransformer[] schemaTransformers, 633IOpenApiSchemaTransformer[] schemaTransformers,
Services\OpenApiOptions.cs (4)
19internal readonly List<IOpenApiSchemaTransformer> SchemaTransformers = []; 140/// <typeparam name="TTransformerType">The type of the <see cref="IOpenApiSchemaTransformer"/> to instantiate.</typeparam> 143where TTransformerType : IOpenApiSchemaTransformer 154public OpenApiOptions AddSchemaTransformer(IOpenApiSchemaTransformer transformer)
Services\Schemas\OpenApiSchemaService.cs (4)
129internal async Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, bool captureSchemaByRef = false, CancellationToken cancellationToken = default) 149internal async Task ApplySchemaTransformersAsync(OpenApiSchema schema, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) 167var transformer = schemaTransformers[i]; 176IOpenApiSchemaTransformer transformer,
Transformers\TypeBasedOpenApiSchemaTransformer.cs (4)
23internal IOpenApiSchemaTransformer InitializeTransformer(IServiceProvider serviceProvider) 25var transformer = _transformerFactory.Invoke(serviceProvider, []) as IOpenApiSchemaTransformer; 26Debug.Assert(transformer != null, $"The type {_transformerType} does not implement {nameof(IOpenApiSchemaTransformer)}.");
Microsoft.AspNetCore.OpenApi.Tests (4)
Transformers\OpenApiOptionsTests.cs (3)
138var insertedTransformer = Assert.Single(options.SchemaTransformers); 156var insertedTransformer = Assert.Single(options.SchemaTransformers); 173var insertedTransformer = Assert.Single(options.SchemaTransformers);
Transformers\SchemaTransformerTests.cs (1)
895private class ActivatedTransformerWithDependency(Dependency dependency) : IOpenApiSchemaTransformer
Sample (1)
Transformers\AddExternalDocsTransformer.cs (1)
9public sealed class AddExternalDocsTransformer(IConfiguration configuration) : IOpenApiOperationTransformer, IOpenApiSchemaTransformer