Skip to content

Commit 1dd840c

Browse files
.Net: Remove the experimental attribute from stable openapi api (#11745)
### Motivation, Context and Description This PR removes the experimental attribute from the API that was introduced a while ago and can be considered stable. Additionally, it enables package validation. Contributes to: #10070
1 parent ab53559 commit 1dd840c

20 files changed

+11
-43
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
4+
<Suppression>
5+
<DiagnosticId>CP0002</DiagnosticId>
6+
<Target>F:Microsoft.SemanticKernel.Plugins.OpenApi.OpenApiKernelFunctionContext.KernelFunctionContextKey</Target>
7+
<Left>lib/netstandard2.0/Microsoft.SemanticKernel.Plugins.OpenApi.dll</Left>
8+
<Right>lib/net8.0/Microsoft.SemanticKernel.Plugins.OpenApi.dll</Right>
9+
</Suppression>
10+
</Suppressions>

dotnet/src/Functions/Functions.OpenApi/Extensions/OpenApiFunctionExecutionParameters.cs

-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ public class OpenApiFunctionExecutionParameters
9696
/// <summary>
9797
/// A custom REST API parameter filter.
9898
/// </summary>
99-
[Experimental("SKEXP0040")]
10099
public RestApiParameterFilter? ParameterFilter { get; set; }
101100

102101
/// <summary>
@@ -119,7 +118,6 @@ public class OpenApiFunctionExecutionParameters
119118
/// <param name="enablePayloadNamespacing">Determines whether payload parameter names are augmented with namespaces.
120119
/// Namespaces prevent naming conflicts by adding the parent parameter name as a prefix, separated by dots.</param>
121120
/// <param name="operationsToExclude">Optional list of operations not to import, e.g. in case they are not supported</param>
122-
[Experimental("SKEXP0040")]
123121
public OpenApiFunctionExecutionParameters(
124122
HttpClient? httpClient = null,
125123
AuthenticateRequestAsyncCallback? authCallback = null,

dotnet/src/Functions/Functions.OpenApi/Functions.OpenApi.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<RootNamespace>$(AssemblyName)</RootNamespace>
66
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
77
<NoWarn>$(NoWarn);SKEXP0040</NoWarn>
8+
<EnablePackageValidation>true</EnablePackageValidation>
89
</PropertyGroup>
910
<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
1011
<Import Project="$(RepoRoot)/dotnet/src/InternalUtilities/src/InternalUtilities.props" />

dotnet/src/Functions/Functions.OpenApi/Model/RestApiExpectedResponse.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// REST API response.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public sealed class RestApiExpectedResponse
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiInfo.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// The REST API information.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public sealed class RestApiInfo
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiOAuthFlow.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Collections.ObjectModel;
6-
using System.Diagnostics.CodeAnalysis;
76

87
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
98

109
/// <summary>
1110
/// REST API OAuth Flow.
1211
/// </summary>
13-
[Experimental("SKEXP0040")]
1412
public sealed class RestApiOAuthFlow
1513
{
1614
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiOAuthFlows.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// REST API OAuth Flows.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public sealed class RestApiOAuthFlows
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiOperation.cs

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Collections.ObjectModel;
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Linq;
87
using System.Net.Http;
98
using System.Text.Json.Nodes;
@@ -14,7 +13,6 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
1413
/// <summary>
1514
/// The REST API operation.
1615
/// </summary>
17-
[Experimental("SKEXP0040")]
1816
public sealed class RestApiOperation
1917
{
2018
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiParameter.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// REST API parameter.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public sealed class RestApiParameter
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiParameterLocation.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// REST API parameter location.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public enum RestApiParameterLocation
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiParameterStyle.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// REST API parameter style.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public enum RestApiParameterStyle
129
{
1310
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiPayload.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5-
using System.Diagnostics.CodeAnalysis;
65

76
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
87

98
/// <summary>
109
/// REST API payload.
1110
/// </summary>
12-
[Experimental("SKEXP0040")]
1311
public sealed class RestApiPayload
1412
{
1513
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiPayloadProperty.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5-
using System.Diagnostics.CodeAnalysis;
65

76
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
87

98
/// <summary>
109
/// REST API payload property.
1110
/// </summary>
12-
[Experimental("SKEXP0040")]
1311
public sealed class RestApiPayloadProperty
1412
{
1513
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiSecurityRequirement.cs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
1010
/// <summary>
1111
/// The REST API security requirement object.
1212
/// </summary>
13-
[Experimental("SKEXP0040")]
1413
#pragma warning disable CA1710 // Identifiers should have correct suffix
1514
public sealed class RestApiSecurityRequirement : IDictionary<RestApiSecurityScheme, IList<string>>, IReadOnlyDictionary<RestApiSecurityScheme, IList<string>>
1615
#pragma warning restore CA1710 // Identifiers should have correct suffix

dotnet/src/Functions/Functions.OpenApi/Model/RestApiSecurityScheme.cs

-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

33
using System;
4-
using System.Diagnostics.CodeAnalysis;
54

65
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
76

87
/// <summary>
98
/// REST API Security Scheme.
109
/// </summary>
11-
[Experimental("SKEXP0040")]
1210
public sealed class RestApiSecurityScheme
1311
{
1412
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiServer.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5-
using System.Diagnostics.CodeAnalysis;
65

76
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
87

98
/// <summary>
109
/// REST API server.
1110
/// </summary>
12-
[Experimental("SKEXP0040")]
1311
public sealed class RestApiServer
1412
{
1513
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiServerVariable.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5-
using System.Diagnostics.CodeAnalysis;
65

76
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
87

98
/// <summary>
109
/// REST API server variable.
1110
/// </summary>
12-
[Experimental("SKEXP0040")]
1311
public sealed class RestApiServerVariable
1412
{
1513
/// <summary>

dotnet/src/Functions/Functions.OpenApi/Model/RestApiSpecification.cs

-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
using System.Collections.Generic;
44
using System.Collections.ObjectModel;
5-
using System.Diagnostics.CodeAnalysis;
65

76
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
87

98
/// <summary>
109
/// REST API specification.
1110
/// </summary>
12-
[Experimental("SKEXP0040")]
1311
public sealed class RestApiSpecification
1412
{
1513
/// <summary>

dotnet/src/Functions/Functions.OpenApi/RestApiParameterFilter.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
@@ -13,5 +11,4 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
1311
/// which will replace the original parameter.
1412
/// </remarks>
1513
/// <param name="context">Instance of <see cref="RestApiParameterFilterContext"/> containing details of the parameter to filter.</param>
16-
[Experimental("SKEXP0040")]
1714
public delegate RestApiParameter? RestApiParameterFilter(RestApiParameterFilterContext context);

dotnet/src/Functions/Functions.OpenApi/RestApiParameterFilterContext.cs

-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22

3-
using System.Diagnostics.CodeAnalysis;
4-
53
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
64

75
/// <summary>
86
/// Initializes a new instance of the <see cref="RestApiParameterFilterContext"/> class.
97
/// </summary>
10-
[Experimental("SKEXP0040")]
118
public sealed class RestApiParameterFilterContext
129
{
1310
/// <summary>

0 commit comments

Comments
 (0)