Skip to content

Commit 6c30834

Browse files
committed
Merge remote-tracking branch 'upstream/main' into BootJs
2 parents d03c90b + 8ec8cbf commit 6c30834

File tree

207 files changed

+935
-685
lines changed

Some content is hidden

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

207 files changed

+935
-685
lines changed

eng/SourceBuildPrebuiltBaseline.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,39 @@
4848
<!-- Transitive dependency of System.Security.Cryptography.Pkcs.5.0.*. -->
4949
<UsagePattern IdentityGlob="System.Formats.Asn1/6.0.0" />
5050
<UsagePattern IdentityGlob="System.Formats.Asn1/5.0.0" />
51+
52+
<!-- Transitive dependency of Microsoft.CodeAnalysis.Workspaces.Common, which gets bumped to latest in full product build -->
53+
<UsagePattern IdentityGlob="Microsoft.NETCore.Targets/1.1.0" />
54+
<UsagePattern IdentityGlob="System.Buffers/4.4.0" />
55+
<UsagePattern IdentityGlob="System.Collections/4.3.0" />
56+
<UsagePattern IdentityGlob="System.Collections.Immutable/1.5.0" />
57+
<UsagePattern IdentityGlob="System.Composition.AttributedModel/1.0.31" />
58+
<UsagePattern IdentityGlob="System.Composition.Convention/1.0.31" />
59+
<UsagePattern IdentityGlob="System.Composition.Hosting/1.0.31" />
60+
<UsagePattern IdentityGlob="System.Composition.Runtime/1.0.31" />
61+
<UsagePattern IdentityGlob="System.Composition.TypedParts/1.0.31" />
62+
<UsagePattern IdentityGlob="System.Diagnostics.Debug/4.3.0" />
63+
<UsagePattern IdentityGlob="System.Diagnostics.Tools/4.3.0" />
64+
<UsagePattern IdentityGlob="System.Globalization/4.3.0" />
65+
<UsagePattern IdentityGlob="System.IO/4.3.0" />
66+
<UsagePattern IdentityGlob="System.Linq/4.3.0" />
67+
<UsagePattern IdentityGlob="System.Linq.Expressions/4.3.0" />
68+
<UsagePattern IdentityGlob="System.Memory/4.5.3" />
69+
<UsagePattern IdentityGlob="System.ObjectModel/4.3.0" />
70+
<UsagePattern IdentityGlob="System.Reflection/4.3.0" />
71+
<UsagePattern IdentityGlob="System.Reflection.Emit/4.3.0" />
72+
<UsagePattern IdentityGlob="System.Reflection.Emit.ILGeneration/4.3.0" />
73+
<UsagePattern IdentityGlob="System.Reflection.Emit.Lightweight/4.3.0" />
74+
<UsagePattern IdentityGlob="System.Reflection.Extensions/4.3.0" />
75+
<UsagePattern IdentityGlob="System.Reflection.Metadata/1.6.0" />
76+
<UsagePattern IdentityGlob="System.Reflection.Primitives/4.3.0" />
77+
<UsagePattern IdentityGlob="System.Reflection.TypeExtensions/4.3.0" />
78+
<UsagePattern IdentityGlob="System.Resources.ResourceManager/4.3.0" />
79+
<UsagePattern IdentityGlob="System.Runtime/4.3.0" />
80+
<UsagePattern IdentityGlob="System.Runtime.Extensions/4.3.0" />
81+
<UsagePattern IdentityGlob="System.Text.Encoding/4.3.0" />
82+
<UsagePattern IdentityGlob="System.Threading/4.3.0" />
83+
<UsagePattern IdentityGlob="System.Threading.Tasks/4.3.0" />
5184
</IgnorePatterns>
5285

5386
<!-- Transitive dependencies, suppressed as per https://github.com/dotnet/aspnetcore/pull/57887#issuecomment-2362241518-->

eng/Version.Details.xml

Lines changed: 164 additions & 164 deletions
Large diffs are not rendered by default.

eng/Versions.props

Lines changed: 84 additions & 84 deletions
Large diffs are not rendered by default.

src/Components/WebView/WebView/src/FileExtensionContentTypeProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public FileExtensionContentTypeProvider()
5858
{ ".atom", "application/atom+xml" },
5959
{ ".au", "audio/basic" },
6060
{ ".avi", "video/x-msvideo" },
61+
{ ".avif", "image/avif" },
6162
{ ".axs", "application/olescript" },
6263
{ ".bas", "text/plain" },
6364
{ ".bcpio", "application/x-bcpio" },

src/Middleware/StaticFiles/src/FileExtensionContentTypeProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public FileExtensionContentTypeProvider()
5252
{ ".atom", "application/atom+xml" },
5353
{ ".au", "audio/basic" },
5454
{ ".avi", "video/x-msvideo" },
55+
{ ".avif", "image/avif" },
5556
{ ".axs", "application/olescript" },
5657
{ ".bas", "text/plain" },
5758
{ ".bcpio", "application/x-bcpio" },

src/OpenApi/src/Comparers/OpenApiTagComparer.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/OpenApi/src/Services/OpenApiDocumentService.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public async Task<OpenApiDocument> GetOpenApiDocumentAsync(IServiceProvider scop
7575
Servers = GetOpenApiServers(httpRequest)
7676
};
7777
document.Paths = await GetOpenApiPathsAsync(document, scopedServiceProvider, operationTransformers, schemaTransformers, cancellationToken);
78-
document.Tags = document.Tags?.Distinct(OpenApiTagComparer.Instance).ToList();
7978
try
8079
{
8180
await ApplyTransformersAsync(document, scopedServiceProvider, cancellationToken);
@@ -327,15 +326,15 @@ private async Task<OpenApiOperation> GetOperationAsync(
327326
=> description.ActionDescriptor.AttributeRouteInfo?.Name ??
328327
description.ActionDescriptor.EndpointMetadata.OfType<IEndpointNameMetadata>().LastOrDefault()?.EndpointName;
329328

330-
private static List<OpenApiTagReference> GetTags(ApiDescription description, OpenApiDocument document)
329+
private static HashSet<OpenApiTagReference> GetTags(ApiDescription description, OpenApiDocument document)
331330
{
332331
var actionDescriptor = description.ActionDescriptor;
333332
if (actionDescriptor.EndpointMetadata?.OfType<ITagsMetadata>().LastOrDefault() is { } tagsMetadata)
334333
{
335-
List<OpenApiTagReference> tags = [];
334+
HashSet<OpenApiTagReference> tags = [];
336335
foreach (var tag in tagsMetadata.Tags)
337336
{
338-
document.Tags ??= [];
337+
document.Tags ??= new HashSet<OpenApiTag>();
339338
document.Tags.Add(new OpenApiTag { Name = tag });
340339
tags.Add(new OpenApiTagReference(tag, document));
341340

@@ -345,9 +344,9 @@ private static List<OpenApiTagReference> GetTags(ApiDescription description, Ope
345344
// If no tags are specified, use the controller name as the tag. This effectively
346345
// allows us to group endpoints by the "resource" concept (e.g. users, todos, etc.)
347346
var controllerName = description.ActionDescriptor.RouteValues["controller"];
348-
document.Tags ??= [];
347+
document.Tags ??= new HashSet<OpenApiTag>();
349348
document.Tags.Add(new OpenApiTag { Name = controllerName });
350-
return [new OpenApiTagReference(controllerName, document)];
349+
return [new(controllerName, document)];
351350
}
352351

353352
private async Task<OpenApiResponses> GetResponsesAsync(

src/OpenApi/src/Services/OpenApiGenerator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,20 +324,20 @@ private static void GenerateDefaultResponses(Dictionary<int, (Type?, MediaTypeCo
324324
return null;
325325
}
326326

327-
private List<OpenApiTagReference> GetOperationTags(MethodInfo methodInfo, EndpointMetadataCollection metadata)
327+
private HashSet<OpenApiTagReference> GetOperationTags(MethodInfo methodInfo, EndpointMetadataCollection metadata)
328328
{
329329
var metadataList = metadata.GetOrderedMetadata<ITagsMetadata>();
330330
var document = new OpenApiDocument();
331331

332332
if (metadataList.Count > 0)
333333
{
334-
var tags = new List<OpenApiTagReference>();
334+
var tags = new HashSet<OpenApiTagReference>();
335335

336336
foreach (var metadataItem in metadataList)
337337
{
338338
foreach (var tag in metadataItem.Tags)
339339
{
340-
document.Tags ??= [];
340+
document.Tags ??= new HashSet<OpenApiTag>();
341341
document.Tags.Add(new OpenApiTag { Name = tag });
342342
tags.Add(new OpenApiTagReference(tag, document));
343343
}
@@ -359,7 +359,7 @@ private List<OpenApiTagReference> GetOperationTags(MethodInfo methodInfo, Endpoi
359359
controllerName = _environment?.ApplicationName ?? string.Empty;
360360
}
361361

362-
document.Tags ??= [];
362+
document.Tags ??= new HashSet<OpenApiTag>();
363363
document.Tags.Add(new OpenApiTag { Name = controllerName });
364364
return [new(controllerName, document)];
365365
}

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Extensions/OpenApiEndpointRouteBuilderExtensionsTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,9 @@ await ValidateOpenApiDocumentAsync(responseBodyStream, document =>
235235
private static async Task ValidateOpenApiDocumentAsync(MemoryStream documentStream, Action<OpenApiDocument> action, string format = "json")
236236
{
237237
documentStream.Position = 0;
238-
OpenApiReaderRegistry.RegisterReader(OpenApiConstants.Yaml, new OpenApiYamlReader());
239-
var result = await OpenApiDocument.LoadAsync(documentStream, format);
238+
var readerSettings = new OpenApiReaderSettings();
239+
readerSettings.AddYamlReader();
240+
var result = await OpenApiDocument.LoadAsync(documentStream, format, readerSettings);
240241
Assert.Empty(result.Diagnostic.Errors);
241242
action(result.Document);
242243
}

src/OpenApi/test/Microsoft.AspNetCore.OpenApi.Tests/Integration/OpenApiDocumentIntegrationTests.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
[UsesVerify]
1212
public sealed class OpenApiDocumentIntegrationTests(SampleAppFixture fixture) : IClassFixture<SampleAppFixture>
1313
{
14-
private static Regex DateTimeRegex() => new(
15-
@"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{7}[+-]\d{2}:\d{2}",
16-
RegexOptions.Compiled);
17-
1814
[Theory]
1915
[InlineData("v1", OpenApiSpecVersion.OpenApi3_0)]
2016
[InlineData("v2", OpenApiSpecVersion.OpenApi3_0)]
@@ -42,7 +38,6 @@ public async Task VerifyOpenApiDocument(string documentName, OpenApiSpecVersion
4238
var outputDirectory = Path.Combine(baseSnapshotsDirectory, version.ToString());
4339
await Verifier.Verify(json)
4440
.UseDirectory(outputDirectory)
45-
.ScrubLinesWithReplace(line => DateTimeRegex().Replace(line, "[datetime]"))
4641
.UseParameters(documentName);
4742
}
4843
}

0 commit comments

Comments
 (0)