Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Promote OpenAPI package to preview #9704

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions dotnet/src/Functions/Functions.OpenApi/AssemblyInfo.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
using Microsoft.SemanticKernel.Http;

Expand Down Expand Up @@ -45,6 +46,7 @@ public class OpenApiFunctionExecutionParameters
/// To support more complex payloads, it should be disabled and the payload should be provided via the 'payload' argument.
/// 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
/// </summary>
[Experimental("SKEXP0040")]
public bool EnableDynamicPayload { get; set; }

/// <summary>
Expand All @@ -55,11 +57,13 @@ public class OpenApiFunctionExecutionParameters
/// the parameters 'sender.email' and 'sender.receiver' will be correctly resolved from arguments with the same names.
/// 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
/// </summary>
[Experimental("SKEXP0040")]
public bool EnablePayloadNamespacing { get; set; }

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

/// <summary>
Expand All @@ -71,6 +75,7 @@ public class OpenApiFunctionExecutionParameters
/// as a stream rather than as a string.
/// If the custom reader is not provided, or the reader returns null, the internal reader is used.
/// </summary>
[Experimental("SKEXP0040")]
public HttpResponseContentReader? HttpResponseContentReader { get; set; }

/// <summary>
Expand All @@ -88,6 +93,7 @@ public class OpenApiFunctionExecutionParameters
/// <param name="enablePayloadNamespacing">Determines whether payload parameter names are augmented with namespaces.
/// Namespaces prevent naming conflicts by adding the parent parameter name as a prefix, separated by dots.</param>
/// <param name="operationsToExclude">Optional list of operations not to import, e.g. in case they are not supported</param>
[Experimental("SKEXP0040")]
public OpenApiFunctionExecutionParameters(
HttpClient? httpClient = null,
AuthenticateRequestAsyncCallback? authCallback = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<AssemblyName>Microsoft.SemanticKernel.Plugins.OpenApi</AssemblyName>
<RootNamespace>$(AssemblyName)</RootNamespace>
<TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
<VersionSuffix>alpha</VersionSuffix>
<NoWarn>$(NoWarn);SKEXP0040</NoWarn>
<VersionSuffix>preview</VersionSuffix>
</PropertyGroup>
<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
<Import Project="$(RepoRoot)/dotnet/src/InternalUtilities/src/InternalUtilities.props" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -11,4 +12,5 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
/// <param name="context">The context containing HTTP operation details.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The HTTP response content.</returns>
[Experimental("SKEXP0040")]
public delegate Task<object?> HttpResponseContentReader(HttpResponseContentReaderContext context, CancellationToken cancellationToken = default);
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Copyright (c) Microsoft. All rights reserved.

using System.Diagnostics.CodeAnalysis;
using System.Net.Http;

namespace Microsoft.SemanticKernel.Plugins.OpenApi;

/// <summary>
/// Represents the context for HTTP response content reader.
/// </summary>
[Experimental("SKEXP0040")]
public sealed class HttpResponseContentReaderContext
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
Expand All @@ -26,6 +27,7 @@ namespace Microsoft.SemanticKernel.Plugins.OpenApi;
/// <summary>
/// Parser for OpenAPI documents.
/// </summary>
[Experimental("SKEXP0040")]
public sealed class OpenApiDocumentParser(ILoggerFactory? loggerFactory = null)
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.SemanticKernel.Plugins.OpenApi;

/// <summary>
/// Options for OpenAPI document parser.
/// </summary>
[Experimental("SKEXP0040")]
public sealed class OpenApiDocumentParserOptions
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
// Copyright (c) Microsoft. All rights reserved.

using System;
using System.Diagnostics.CodeAnalysis;

namespace Microsoft.SemanticKernel.Plugins.OpenApi;

/// <summary>
/// Represents the context for an operation selection predicate.
/// </summary>
[Experimental("SKEXP0040")]
public readonly struct OperationSelectionPredicateContext : IEquatable<OperationSelectionPredicateContext>
{
/// <summary>
Expand Down
Loading