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
Lines changed: 10 additions & 0 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 3 deletions
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

Lines changed: 0 additions & 3 deletions
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>

0 commit comments

Comments
 (0)