-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Mitigate support for OpenAPI 3.1 #354
Mitigate support for OpenAPI 3.1 #354
Conversation
… to 3.0.1 by rewriting the document version.
dotnet/src/SemanticKernel.Skills/Skills.OpenAPI/Extensions/KernelOpenApiExtensions.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just 2 comments:
- async/await thing mentioned below
- where we are adding awaits, please add start adding .ConfigureAwait(false) as a general good practice (we'll need to make this change in the whole kernel project at some point)
dotnet/src/SemanticKernel.Skills/Skills.OpenAPI/Extensions/KernelOpenApiExtensions.cs
Outdated
Show resolved
Hide resolved
Removed the awaits where it was possible and added ConfigureAwait(false) to all awaits in OpenAPI sills functionality. |
dotnet/src/SemanticKernel.Skills/Skills.OpenAPI/OpenApi/OpenApiDocumentParser.cs
Show resolved
Hide resolved
### Motivation and Context This PR adds support for OpenAPI 3.1 spec to OpenAPI skills functionality that may be useful in scenarios when OpenAPI 3.1 skills are imported directly from OpenAPI documents or indirectly through ChatGPT plugins. ### Description To support the OpenAPI 3.1 specification, the OpenApiDocumentParser class performs the following actions: - Adapts/converts YAML content to JSON for further processing using System.Text.Json API. - Tries to find the 'openapi' property. - Downgrade the property value to latest supported version - 3.0.1 if the version in the document is higher. - Passes the updated JSON OpenAPI document to Microsoft.OpenAPI.NET library for parsing. Other small changes introduced in this PR: - Cancellation toke is added to all ImportChatGptPluginSkill* and ImportOpenApiSkill* methods. - All the ImportChatGptPluginSkill* and ImportOpenApiSkill* methods are made asynchronous. - ReadAsync method of OpenApiReader class is used Read one.
…ft#354) Bumps [Microsoft.Azure.Cosmos](https://github.com/Azure/azure-cosmos-dotnet-v3) from 3.35.3 to 3.35.4. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md">Microsoft.Azure.Cosmos's changelog</a>.</em></p> <blockquote> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.4">3.35.4</a> - 2023-09-15</h3> <h4>Fixed</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/3934">3934</a> Subpartitioning: Fixes bug for queries on subpartitioned containers with split physical partitions</li> </ul> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.3-preview">3.35.3-preview</a> - 2023-08-10</h3> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Azure/azure-cosmos-dotnet-v3/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Azure.Cosmos&package-manager=nuget&previous-version=3.35.3&new-version=3.35.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Motivation and Context
This PR adds support for OpenAPI 3.1 spec to OpenAPI skills functionality that may be useful in scenarios when OpenAPI 3.1 skills are imported directly from OpenAPI documents or indirectly through ChatGPT plugins.
Description
To support the OpenAPI 3.1 specification, the OpenApiDocumentParser class performs the following actions:
Other small changes introduced in this PR:
Contribution Checklist
dotnet format