Skip to content

Commit

Permalink
.Net: Decoupling form OpenApi (#4356)
Browse files Browse the repository at this point in the history
1. The `RestApiOperationResponse` class and its converter have been
moved to the abstraction layer to prevent unnecessary coupling of other
projects with the OpenApi one.
2. The unnecessary coupling to the OpenApi project has been removed from
the planners project.
  • Loading branch information
SergeyMenshykh committed Dec 18, 2023
1 parent af64b02 commit 783908e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using Microsoft.SemanticKernel.Plugins.OpenApi;
using Microsoft.SemanticKernel;
using Xunit;

namespace SemanticKernel.Functions.UnitTests.OpenApi;
Expand Down
1 change: 0 additions & 1 deletion dotnet/src/Planners/Planners.OpenAI/Planners.OpenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

<ItemGroup>
<ProjectReference Include="..\..\Connectors\Connectors.OpenAI\Connectors.OpenAI.csproj" />
<ProjectReference Include="..\..\Functions\Functions.OpenApi\Functions.OpenApi.csproj" />
<ProjectReference Include="..\..\Functions\Functions.Yaml\Functions.Yaml.csproj" />
<ProjectReference Include="..\..\SemanticKernel.Abstractions\SemanticKernel.Abstractions.csproj" />
<ProjectReference Include="..\..\SemanticKernel.Core\SemanticKernel.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Plugins.OpenApi;

namespace Microsoft.SemanticKernel.Planning;

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

using System.ComponentModel;

namespace Microsoft.SemanticKernel.Plugins.OpenApi;
namespace Microsoft.SemanticKernel;

/// <summary>
/// The REST API operation response.
Expand All @@ -23,7 +23,7 @@ public sealed class RestApiOperationResponse
/// <summary>
/// The expected schema of the response as advertised in the OpenAPI operation.
/// </summary>
public KernelJsonSchema? ExpectedSchema { get; internal set; }
public KernelJsonSchema? ExpectedSchema { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="RestApiOperationResponse"/> class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.ComponentModel;
using System.Globalization;

namespace Microsoft.SemanticKernel.Plugins.OpenApi;
namespace Microsoft.SemanticKernel;

/// <summary>
/// Converts a object of <see cref="RestApiOperationResponse"/> type to string type.
Expand Down

0 comments on commit 783908e

Please sign in to comment.