Skip to content

Commit ee050bd

Browse files
authored
Update Microsoft.OpenApi to preview28 (#62363)
1 parent ef0da55 commit ee050bd

File tree

74 files changed

+144
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+144
-203
lines changed

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@
323323
<XunitExtensibilityCoreVersion>$(XunitVersion)</XunitExtensibilityCoreVersion>
324324
<XunitExtensibilityExecutionVersion>$(XunitVersion)</XunitExtensibilityExecutionVersion>
325325
<MicrosoftDataSqlClientVersion>5.2.2</MicrosoftDataSqlClientVersion>
326-
<MicrosoftOpenApiVersion>2.0.0-preview.18</MicrosoftOpenApiVersion>
327-
<MicrosoftOpenApiYamlReaderVersion>2.0.0-preview.18</MicrosoftOpenApiYamlReaderVersion>
326+
<MicrosoftOpenApiVersion>2.0.0-preview.29</MicrosoftOpenApiVersion>
327+
<MicrosoftOpenApiYamlReaderVersion>2.0.0-preview.29</MicrosoftOpenApiYamlReaderVersion>
328328
<!-- dotnet tool versions (see also auto-updated DotnetEfVersion property). -->
329329
<DotnetDumpVersion>6.0.322601</DotnetDumpVersion>
330330
<DotnetServeVersion>1.10.93</DotnetServeVersion>

src/OpenApi/gen/XmlCommentGenerator.Emitter.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,7 @@ namespace Microsoft.AspNetCore.OpenApi.Generated
5858
using Microsoft.AspNetCore.OpenApi;
5959
using Microsoft.AspNetCore.Mvc.Controllers;
6060
using Microsoft.Extensions.DependencyInjection;
61-
using Microsoft.OpenApi.Models;
62-
using Microsoft.OpenApi.Models.Interfaces;
63-
using Microsoft.OpenApi.Models.References;
61+
using Microsoft.OpenApi;
6462
6563
{{GeneratedCodeAttribute}}
6664
file record XmlComment(

src/OpenApi/perf/Microbenchmarks/TransformersBenchmark.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
using Microsoft.AspNetCore.Builder;
66
using Microsoft.AspNetCore.Routing;
77
using Microsoft.Extensions.DependencyInjection;
8-
using Microsoft.OpenApi.Extensions;
9-
using Microsoft.OpenApi.Models;
8+
using Microsoft.OpenApi;
109

1110
namespace Microsoft.AspNetCore.OpenApi.Microbenchmarks;
1211

@@ -102,7 +101,7 @@ public void SchemaTransformer_Setup()
102101
{
103102
_options.AddSchemaTransformer((schema, context, token) =>
104103
{
105-
schema.Extensions ??= [];
104+
schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
106105
if (context.JsonTypeInfo.Type == typeof(Todo) && context.ParameterDescription != null)
107106
{
108107
schema.Extensions["x-my-extension"] = new JsonNodeExtension(context.ParameterDescription.Name);
@@ -176,7 +175,7 @@ private class SchemaTransformer : IOpenApiSchemaTransformer
176175
{
177176
public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext context, CancellationToken cancellationToken)
178177
{
179-
schema.Extensions ??= [];
178+
schema.Extensions ??= new Dictionary<string, IOpenApiExtension>();
180179
if (context.JsonTypeInfo.Type == typeof(Todo) && context.ParameterDescription != null)
181180
{
182181
schema.Extensions["x-my-extension"] = new JsonNodeExtension(context.ParameterDescription.Name);

src/OpenApi/sample/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Text.Json.Serialization;
5-
using Microsoft.OpenApi.Models;
65
using Sample.Transformers;
76

87
var builder = WebApplication.CreateBuilder(args);

src/OpenApi/sample/Sample.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,8 @@
3939
<ProjectReference Include="../gen/Microsoft.AspNetCore.OpenApi.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
4040
</ItemGroup>
4141

42+
<ItemGroup>
43+
<Using Include="Microsoft.OpenApi" />
44+
</ItemGroup>
45+
4246
</Project>

src/OpenApi/sample/Transformers/AddBearerSecuritySchemeTransformer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
using Microsoft.AspNetCore.Authentication;
55
using Microsoft.AspNetCore.OpenApi;
6-
using Microsoft.OpenApi.Models;
7-
using Microsoft.OpenApi.Models.Interfaces;
86

97
namespace Sample.Transformers;
108

src/OpenApi/sample/Transformers/AddContactTransformer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.OpenApi;
5-
using Microsoft.OpenApi.Models;
65

76
namespace Sample.Transformers;
87

src/OpenApi/sample/Transformers/AddExternalDocsTransformer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.OpenApi;
5-
using Microsoft.OpenApi.Models;
65

76
namespace Sample.Transformers;
87

src/OpenApi/sample/Transformers/OperationTransformers.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using Microsoft.AspNetCore.OpenApi;
5-
using Microsoft.OpenApi.Extensions;
6-
using Microsoft.OpenApi.Models;
75

86
namespace Sample.Transformers;
97

src/OpenApi/src/Extensions/JsonNodeSchemaExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
using Microsoft.AspNetCore.Mvc.ModelBinding;
1616
using Microsoft.AspNetCore.Routing;
1717
using Microsoft.AspNetCore.Routing.Constraints;
18-
using Microsoft.OpenApi.Models;
1918

2019
namespace Microsoft.AspNetCore.OpenApi;
2120

src/OpenApi/src/Extensions/OpenApiDocumentExtensions.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using Microsoft.OpenApi.Models;
5-
using Microsoft.OpenApi.Models.Interfaces;
6-
using Microsoft.OpenApi.Models.References;
7-
84
namespace Microsoft.AspNetCore.OpenApi;
95

106
internal static class OpenApiDocumentExtensions

src/OpenApi/src/Extensions/OpenApiEndpointConventionBuilderExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Microsoft.AspNetCore.Routing;
1010
using Microsoft.Extensions.DependencyInjection;
1111
using Microsoft.Extensions.Hosting;
12-
using Microsoft.OpenApi.Models;
1312

1413
namespace Microsoft.AspNetCore.Builder;
1514

src/OpenApi/src/Extensions/OpenApiEndpointRouteBuilderExtensions.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
using Microsoft.AspNetCore.Routing;
99
using Microsoft.Extensions.DependencyInjection;
1010
using Microsoft.Extensions.Options;
11-
using Microsoft.OpenApi.Extensions;
12-
using Microsoft.OpenApi.Writers;
1311

1412
namespace Microsoft.AspNetCore.Builder;
1513

@@ -25,10 +23,10 @@ public static class OpenApiEndpointRouteBuilderExtensions
2523
/// <param name="endpoints">The <see cref="IEndpointRouteBuilder"/>.</param>
2624
/// <param name="pattern">The route to register the endpoint on. Must include the 'documentName' route parameter.</param>
2725
/// <returns>An <see cref="IEndpointRouteBuilder"/> that can be used to further customize the endpoint.</returns>
28-
public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern = OpenApiConstants.DefaultOpenApiRoute)
26+
public static IEndpointConventionBuilder MapOpenApi(this IEndpointRouteBuilder endpoints, [StringSyntax("Route")] string pattern = OpenApi.OpenApiConstants.DefaultOpenApiRoute)
2927
{
3028
var options = endpoints.ServiceProvider.GetRequiredService<IOptionsMonitor<OpenApiOptions>>();
31-
return endpoints.MapGet(pattern, async (HttpContext context, string documentName = OpenApiConstants.DefaultDocumentName) =>
29+
return endpoints.MapGet(pattern, async (HttpContext context, string documentName = OpenApi.OpenApiConstants.DefaultDocumentName) =>
3230
{
3331
// We need to retrieve the document name in a case-insensitive manner to support case-insensitive document name resolution.
3432
// The document service is registered with a key equal to the document name, but in lowercase.

src/OpenApi/src/Extensions/OpenApiServiceCollectionExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.Extensions.ApiDescriptions;
88
using Microsoft.Extensions.DependencyInjection.Extensions;
99
using Microsoft.Extensions.Options;
10+
using OpenApiConstants = Microsoft.AspNetCore.OpenApi.OpenApiConstants;
1011

1112
namespace Microsoft.Extensions.DependencyInjection;
1213

src/OpenApi/src/Microsoft.AspNetCore.OpenApi.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@
4949
<!-- Required to bundle source generator related assets into build. -->
5050
<ItemGroup>
5151
<ProjectReference Include="$(RepoRoot)/src/OpenApi/gen/Microsoft.AspNetCore.OpenApi.SourceGenerators.csproj" ReferenceOutputAssembly="false" />
52-
<None Include="$(ArtifactsBinDir)\Microsoft.AspNetCore.OpenApi.SourceGenerators\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.OpenApi.SourceGenerators.dll"
53-
Pack="true"
54-
PackagePath="analyzers/dotnet/cs"
55-
Visible="false" />
52+
<None Include="$(ArtifactsBinDir)\Microsoft.AspNetCore.OpenApi.SourceGenerators\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.OpenApi.SourceGenerators.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
5653
<None Include="..\build\Microsoft.AspNetCore.OpenApi.targets" Pack="true" PackagePath="build" Visible="false" />
5754
</ItemGroup>
5855

56+
<ItemGroup>
57+
<Using Include="Microsoft.OpenApi" />
58+
</ItemGroup>
59+
5960
</Project>
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
#nullable enable
2+
*REMOVED*Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiDocument! document, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
3+
*REMOVED*Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiOperation! operation, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
4+
*REMOVED*Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer.TransformAsync(Microsoft.OpenApi.Models.OpenApiSchema! schema, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
5+
*REMOVED*Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(System.Func<Microsoft.OpenApi.Models.OpenApiDocument!, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
6+
*REMOVED*Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(System.Func<Microsoft.OpenApi.Models.OpenApiOperation!, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
7+
*REMOVED*Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(System.Func<Microsoft.OpenApi.Models.OpenApiSchema!, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
8+
*REMOVED*static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.WithOpenApi<TBuilder>(this TBuilder builder, System.Func<Microsoft.OpenApi.Models.OpenApiOperation!, Microsoft.OpenApi.Models.OpenApiOperation!>! configureOperation) -> TBuilder
29
Microsoft.AspNetCore.OpenApi.IOpenApiDocumentProvider
3-
Microsoft.AspNetCore.OpenApi.IOpenApiDocumentProvider.GetOpenApiDocumentAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.Models.OpenApiDocument!>!
4-
static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.AddOpenApiOperationTransformer<TBuilder>(this TBuilder builder, System.Func<Microsoft.OpenApi.Models.OpenApiOperation!, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> TBuilder
5-
Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.Models.OpenApiSchema!>!
6-
Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Document.get -> Microsoft.OpenApi.Models.OpenApiDocument?
10+
Microsoft.AspNetCore.OpenApi.IOpenApiDocumentProvider.GetOpenApiDocumentAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiDocument!>!
11+
Microsoft.AspNetCore.OpenApi.IOpenApiDocumentTransformer.TransformAsync(Microsoft.OpenApi.OpenApiDocument! document, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
12+
Microsoft.AspNetCore.OpenApi.IOpenApiOperationTransformer.TransformAsync(Microsoft.OpenApi.OpenApiOperation! operation, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
13+
Microsoft.AspNetCore.OpenApi.IOpenApiSchemaTransformer.TransformAsync(Microsoft.OpenApi.OpenApiSchema! schema, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext! context, System.Threading.CancellationToken cancellationToken) -> System.Threading.Tasks.Task!
14+
Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddDocumentTransformer(System.Func<Microsoft.OpenApi.OpenApiDocument!, Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
15+
Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddOperationTransformer(System.Func<Microsoft.OpenApi.OpenApiOperation!, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
16+
Microsoft.AspNetCore.OpenApi.OpenApiOptions.AddSchemaTransformer(System.Func<Microsoft.OpenApi.OpenApiSchema!, Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> Microsoft.AspNetCore.OpenApi.OpenApiOptions!
17+
static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.AddOpenApiOperationTransformer<TBuilder>(this TBuilder builder, System.Func<Microsoft.OpenApi.OpenApiOperation!, Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext!, System.Threading.CancellationToken, System.Threading.Tasks.Task!>! transformer) -> TBuilder
18+
Microsoft.AspNetCore.OpenApi.OpenApiDocumentTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiSchema!>!
19+
Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Document.get -> Microsoft.OpenApi.OpenApiDocument?
720
Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.Document.init -> void
8-
Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.Models.OpenApiSchema!>!
9-
Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Document.get -> Microsoft.OpenApi.Models.OpenApiDocument?
21+
Microsoft.AspNetCore.OpenApi.OpenApiOperationTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiSchema!>!
22+
Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Document.get -> Microsoft.OpenApi.OpenApiDocument?
1023
Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.Document.init -> void
11-
Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.Models.OpenApiSchema!>!
24+
Microsoft.AspNetCore.OpenApi.OpenApiSchemaTransformerContext.GetOrCreateSchemaAsync(System.Type! type, Microsoft.AspNetCore.Mvc.ApiExplorer.ApiParameterDescription? parameterDescription = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.OpenApi.OpenApiSchema!>!
25+
static Microsoft.AspNetCore.Builder.OpenApiEndpointConventionBuilderExtensions.WithOpenApi<TBuilder>(this TBuilder builder, System.Func<Microsoft.OpenApi.OpenApiOperation!, Microsoft.OpenApi.OpenApiOperation!>! configureOperation) -> TBuilder

src/OpenApi/src/Schemas/OpenApiJsonSchema.Helpers.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
using System.Text.Json.Nodes;
99
using System.Text.Json.Serialization;
1010
using Microsoft.AspNetCore.OpenApi;
11-
using Microsoft.OpenApi.Models;
12-
using Microsoft.OpenApi.Models.Interfaces;
13-
using Microsoft.OpenApi.Models.References;
11+
1412
using OpenApiConstants = Microsoft.AspNetCore.OpenApi.OpenApiConstants;
1513

1614
internal sealed partial class OpenApiJsonSchema
@@ -309,14 +307,14 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName,
309307
schema.Discriminator ??= new OpenApiDiscriminator();
310308
foreach (var kvp in mappings)
311309
{
312-
schema.Discriminator.Mapping ??= [];
310+
schema.Discriminator.Mapping ??= new Dictionary<string, OpenApiSchemaReference>();
313311
schema.Discriminator.Mapping[kvp.Key] = new OpenApiSchemaReference(kvp.Value);
314312
}
315313
}
316314
break;
317315
case OpenApiConstants.SchemaId:
318316
reader.Read();
319-
schema.Metadata ??= [];
317+
schema.Metadata ??= new Dictionary<string, object>();
320318
schema.Metadata.Add(OpenApiConstants.SchemaId, reader.GetString() ?? string.Empty);
321319
break;
322320
// OpenAPI does not support the `const` keyword in its schema implementation, so
@@ -328,7 +326,7 @@ public static void ReadProperty(ref Utf8JsonReader reader, string propertyName,
328326
break;
329327
case OpenApiSchemaKeywords.RefKeyword:
330328
reader.Read();
331-
schema.Metadata ??= [];
329+
schema.Metadata ??= new Dictionary<string, object>();
332330
schema.Metadata[OpenApiConstants.RefId] = reader.GetString() ?? string.Empty;
333331
break;
334332
default:

src/OpenApi/src/Schemas/OpenApiJsonSchema.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System.Text.Json;
55
using System.Text.Json.Serialization;
6-
using Microsoft.OpenApi.Models;
76

87
[JsonConverter(typeof(JsonConverter))]
98
internal sealed partial class OpenApiJsonSchema(OpenApiSchema schema)

src/OpenApi/src/Services/IDocumentProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using Microsoft.OpenApi;
5-
64
namespace Microsoft.Extensions.ApiDescriptions;
75

86
/// <summary>

src/OpenApi/src/Services/IOpenApiDocumentProvider.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4-
using Microsoft.OpenApi.Models;
5-
64
namespace Microsoft.AspNetCore.OpenApi;
75

86
/// <summary>

src/OpenApi/src/Services/OpenApiDocumentProvider.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
using Microsoft.AspNetCore.OpenApi;
55
using Microsoft.Extensions.DependencyInjection;
66
using Microsoft.Extensions.Options;
7-
using Microsoft.OpenApi;
8-
using Microsoft.OpenApi.Extensions;
9-
using Microsoft.OpenApi.Writers;
107
using System.Linq;
118

129
namespace Microsoft.Extensions.ApiDescriptions;

0 commit comments

Comments
 (0)