Skip to content

Commit 549ebad

Browse files
[main] Source code updates from dotnet/aspnetcore (#1507)
[main] Source code updates from dotnet/aspnetcore
1 parent 03413ec commit 549ebad

12 files changed

+32
-14
lines changed

src/aspnetcore/eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@
325325
<XunitExtensibilityCoreVersion>$(XunitVersion)</XunitExtensibilityCoreVersion>
326326
<XunitExtensibilityExecutionVersion>$(XunitVersion)</XunitExtensibilityExecutionVersion>
327327
<MicrosoftDataSqlClientVersion>5.2.2</MicrosoftDataSqlClientVersion>
328-
<MicrosoftOpenApiVersion>2.0.0-preview.29</MicrosoftOpenApiVersion>
329-
<MicrosoftOpenApiYamlReaderVersion>2.0.0-preview.29</MicrosoftOpenApiYamlReaderVersion>
328+
<MicrosoftOpenApiVersion>2.0.0</MicrosoftOpenApiVersion>
329+
<MicrosoftOpenApiYamlReaderVersion>2.0.0</MicrosoftOpenApiYamlReaderVersion>
330330
<!-- dotnet tool versions (see also auto-updated DotnetEfVersion property). -->
331331
<DotnetDumpVersion>6.0.322601</DotnetDumpVersion>
332332
<DotnetServeVersion>1.10.93</DotnetServeVersion>

src/aspnetcore/src/Framework/AspNetCoreAnalyzers/src/SourceGenerators/PublicTopLevelProgramGenerator.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ public class PublicProgramSourceGenerator : IIncrementalGenerator
1212
{
1313
private const string PublicPartialProgramClassSource = """
1414
// <auto-generated />
15-
#pragma warning disable CS1591
15+
/// <summary>
16+
/// Auto-generated public partial Program class for top-level statement apps.
17+
/// </summary>
1618
public partial class Program { }
17-
#pragma warning restore CS1591
1819
""";
1920

2021
public void Initialize(IncrementalGeneratorInitializationContext context)

src/aspnetcore/src/Framework/AspNetCoreAnalyzers/test/SourceGenerators/PublicTopLevelProgramGeneratorTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ public class PublicTopLevelProgramGeneratorTests
99
{
1010
private const string ExpectedGeneratedSource = """
1111
// <auto-generated />
12-
#pragma warning disable CS1591
12+
/// <summary>
13+
/// Auto-generated public partial Program class for top-level statement apps.
14+
/// </summary>
1315
public partial class Program { }
14-
#pragma warning restore CS1591
1516
""";
1617

1718
[Fact]

src/aspnetcore/src/OpenApi/gen/XmlCommentGenerator.Emitter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
9393
}
9494
}
9595
96+
{{GeneratedCodeAttribute}}
9697
file static class DocumentationCommentIdHelper
9798
{
9899
/// <summary>
@@ -471,6 +472,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
471472
}
472473
}
473474
475+
{{GeneratedCodeAttribute}}
474476
file static class JsonNodeExtensions
475477
{
476478
public static JsonNode? Parse(this string? json)

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/AddOpenApiTests.CanInterceptAddOpenApi#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
7575
}
7676
}
7777

78+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
7879
file static class DocumentationCommentIdHelper
7980
{
8081
/// <summary>
@@ -453,6 +454,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
453454
}
454455
}
455456

457+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
456458
file static class JsonNodeExtensions
457459
{
458460
public static JsonNode? Parse(this string? json)
@@ -527,4 +529,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services, st
527529
}
528530

529531
}
530-
}
532+
}

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/AdditionalTextsTests.CanHandleXmlForSchemasInAdditionalTexts#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
104104
}
105105
}
106106

107+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
107108
file static class DocumentationCommentIdHelper
108109
{
109110
/// <summary>
@@ -482,6 +483,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
482483
}
483484
}
484485

486+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
485487
file static class JsonNodeExtensions
486488
{
487489
public static JsonNode? Parse(this string? json)
@@ -524,4 +526,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services)
524526
}
525527

526528
}
527-
}
529+
}

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/CompletenessTests.SupportsAllXmlTagsOnSchemas#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ method as a cref attribute.
196196
}
197197
}
198198

199+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
199200
file static class DocumentationCommentIdHelper
200201
{
201202
/// <summary>
@@ -574,6 +575,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
574575
}
575576
}
576577

578+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
577579
file static class JsonNodeExtensions
578580
{
579581
public static JsonNode? Parse(this string? json)
@@ -616,4 +618,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services)
616618
}
617619

618620
}
619-
}
621+
}

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/OperationTests.SupportsXmlCommentsOnOperationsFromControllers#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
7979
}
8080
}
8181

82+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
8283
file static class DocumentationCommentIdHelper
8384
{
8485
/// <summary>
@@ -457,6 +458,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
457458
}
458459
}
459460

461+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
460462
file static class JsonNodeExtensions
461463
{
462464
public static JsonNode? Parse(this string? json)
@@ -499,4 +501,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services)
499501
}
500502

501503
}
502-
}
504+
}

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/OperationTests.SupportsXmlCommentsOnOperationsFromMinimalApis#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
9797
}
9898
}
9999

100+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
100101
file static class DocumentationCommentIdHelper
101102
{
102103
/// <summary>
@@ -475,6 +476,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
475476
}
476477
}
477478

479+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
478480
file static class JsonNodeExtensions
479481
{
480482
public static JsonNode? Parse(this string? json)
@@ -517,4 +519,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services)
517519
}
518520

519521
}
520-
}
522+
}

src/aspnetcore/src/OpenApi/test/Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests/snapshots/SchemaTests.SupportsXmlCommentsOnSchemas#OpenApiXmlCommentSupport.generated.verified.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ private static Dictionary<string, XmlComment> GenerateCacheEntries()
105105
}
106106
}
107107

108+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
108109
file static class DocumentationCommentIdHelper
109110
{
110111
/// <summary>
@@ -483,6 +484,7 @@ public Task TransformAsync(OpenApiSchema schema, OpenApiSchemaTransformerContext
483484
}
484485
}
485486

487+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.AspNetCore.OpenApi.SourceGenerators, Version=42.42.42.42, Culture=neutral, PublicKeyToken=adb9793829ddae60", "42.42.42.42")]
486488
file static class JsonNodeExtensions
487489
{
488490
public static JsonNode? Parse(this string? json)
@@ -525,4 +527,4 @@ public static IServiceCollection AddOpenApi(this IServiceCollection services)
525527
}
526528

527529
}
528-
}
530+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy