Skip to content

Commit 691f561

Browse files
authoredNov 14, 2024
.Net: Promote OpenAPI package to preview (microsoft#9704)
### Motivation, Context and Description Promote Functions.OpenApi package to preview. Closes: microsoft#9636
1 parent 9c50788 commit 691f561

8 files changed

+18
-7
lines changed
 

‎dotnet/src/Functions/Functions.OpenApi/AssemblyInfo.cs

-6
This file was deleted.

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

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using System;
44
using System.Collections.Generic;
5+
using System.Diagnostics.CodeAnalysis;
56
using System.Net.Http;
67
using Microsoft.Extensions.Logging;
78
using Microsoft.SemanticKernel.Http;
@@ -46,6 +47,7 @@ public class OpenApiFunctionExecutionParameters
4647
/// To support more complex payloads, it should be disabled and the payload should be provided via the 'payload' argument.
4748
/// See the 'Providing Payload for OpenAPI Functions' ADR for more details: https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0062-open-api-payload.md
4849
/// </summary>
50+
[Experimental("SKEXP0040")]
4951
public bool EnableDynamicPayload { get; set; }
5052

5153
/// <summary>
@@ -56,11 +58,13 @@ public class OpenApiFunctionExecutionParameters
5658
/// the parameters 'sender.email' and 'sender.receiver' will be correctly resolved from arguments with the same names.
5759
/// See the 'Providing Payload for OpenAPI Functions' ADR for more details: https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0062-open-api-payload.md
5860
/// </summary>
61+
[Experimental("SKEXP0040")]
5962
public bool EnablePayloadNamespacing { get; set; }
6063

6164
/// <summary>
6265
/// Optional list of HTTP operations to skip when importing the OpenAPI document.
6366
/// </summary>
67+
[Experimental("SKEXP0040")]
6468
public IList<string> OperationsToExclude { get; set; }
6569

6670
/// <summary>
@@ -72,6 +76,7 @@ public class OpenApiFunctionExecutionParameters
7276
/// as a stream rather than as a string.
7377
/// If the custom reader is not provided, or the reader returns null, the internal reader is used.
7478
/// </summary>
79+
[Experimental("SKEXP0040")]
7580
public HttpResponseContentReader? HttpResponseContentReader { get; set; }
7681

7782
/// <summary>
@@ -94,6 +99,7 @@ public class OpenApiFunctionExecutionParameters
9499
/// <param name="enablePayloadNamespacing">Determines whether payload parameter names are augmented with namespaces.
95100
/// Namespaces prevent naming conflicts by adding the parent parameter name as a prefix, separated by dots.</param>
96101
/// <param name="operationsToExclude">Optional list of operations not to import, e.g. in case they are not supported</param>
102+
[Experimental("SKEXP0040")]
97103
public OpenApiFunctionExecutionParameters(
98104
HttpClient? httpClient = null,
99105
AuthenticateRequestAsyncCallback? authCallback = null,

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<AssemblyName>Microsoft.SemanticKernel.Plugins.OpenApi</AssemblyName>
55
<RootNamespace>$(AssemblyName)</RootNamespace>
66
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
7-
<VersionSuffix>alpha</VersionSuffix>
7+
<NoWarn>$(NoWarn);SKEXP0040</NoWarn>
8+
<VersionSuffix>preview</VersionSuffix>
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/HttpResponseContentReader.cs

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

3+
using System.Diagnostics.CodeAnalysis;
34
using System.Threading;
45
using System.Threading.Tasks;
56

@@ -11,4 +12,5 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
1112
/// <param name="context">The context containing HTTP operation details.</param>
1213
/// <param name="cancellationToken">The cancellation token.</param>
1314
/// <returns>The HTTP response content.</returns>
15+
[Experimental("SKEXP0040")]
1416
public delegate Task<object?> HttpResponseContentReader(HttpResponseContentReaderContext context, CancellationToken cancellationToken = default);

‎dotnet/src/Functions/Functions.OpenApi/HttpResponseContentReaderContext.cs

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

3+
using System.Diagnostics.CodeAnalysis;
34
using System.Net.Http;
45

56
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
67

78
/// <summary>
89
/// Represents the context for HTTP response content reader.
910
/// </summary>
11+
[Experimental("SKEXP0040")]
1012
public sealed class HttpResponseContentReaderContext
1113
{
1214
/// <summary>

‎dotnet/src/Functions/Functions.OpenApi/OpenApi/OpenApiDocumentParser.cs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Collections.ObjectModel;
6+
using System.Diagnostics.CodeAnalysis;
67
using System.Globalization;
78
using System.IO;
89
using System.Linq;
@@ -26,6 +27,7 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
2627
/// <summary>
2728
/// Parser for OpenAPI documents.
2829
/// </summary>
30+
[Experimental("SKEXP0040")]
2931
public sealed class OpenApiDocumentParser(ILoggerFactory? loggerFactory = null)
3032
{
3133
/// <summary>

‎dotnet/src/Functions/Functions.OpenApi/OpenApi/OpenApiDocumentParserOptions.cs

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

33
using System;
4+
using System.Diagnostics.CodeAnalysis;
45

56
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
67

78
/// <summary>
89
/// Options for OpenAPI document parser.
910
/// </summary>
11+
[Experimental("SKEXP0040")]
1012
public sealed class OpenApiDocumentParserOptions
1113
{
1214
/// <summary>

‎dotnet/src/Functions/Functions.OpenApi/OpenApi/OperationSelectionPredicateContext.cs

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

33
using System;
4+
using System.Diagnostics.CodeAnalysis;
45

56
namespace Microsoft.SemanticKernel.Plugins.OpenApi;
67

78
/// <summary>
89
/// Represents the context for an operation selection predicate.
910
/// </summary>
11+
[Experimental("SKEXP0040")]
1012
public readonly struct OperationSelectionPredicateContext : IEquatable<OperationSelectionPredicateContext>
1113
{
1214
/// <summary>

0 commit comments

Comments
 (0)
Please sign in to comment.