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: [API Manifest] Introduce ApiManifestPluginParameters to cover multiple API dependencies scenario #5603

Closed
Tracked by #83
zengin opened this issue Mar 21, 2024 · 0 comments · Fixed by #5605
Closed
Tracked by #83
Assignees
Labels
.NET Issue or Pull requests regarding .NET code openapi Issues related to the OpenAPI function importer

Comments

@zengin
Copy link
Contributor

zengin commented Mar 21, 2024

Describe the bug
Current plugin generation from API Manifest relies on a single OpenApiFunctionExecutionParameters object, which contains authCallback, serverUrlOverride etc. An API Manifest file can contain multiple API dependencies with different OpenApiFunctionExecutionParameters. We need a wrapper that contains multiple OpenApiFunctionExecutionParameters.

@zengin zengin changed the title [API Manifest] Introduce ApiManifestFunctionExecutionParameters to cover multiple API dependencies scenario [API Manifest] Introduce ApiManifestPluginParameters to cover multiple API dependencies scenario Mar 21, 2024
@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code openapi Issues related to the OpenAPI function importer labels Mar 22, 2024
@github-actions github-actions bot changed the title [API Manifest] Introduce ApiManifestPluginParameters to cover multiple API dependencies scenario .Net: [API Manifest] Introduce ApiManifestPluginParameters to cover multiple API dependencies scenario Mar 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 27, 2024
…ependencies (#5605)

### Motivation and Context

- fixes #5603 

### Description
- introduces ApiManifestPluginParameters with three parameters:
- `HttpClient` and `UserAgent` to be used in plugin initialization phase
(to fetch OpenAPI documents)
- `FunctionExecutionParameters`: A mapping of api dependency name to
`OpenApiFunctionExecutionParameters`, so that we can introduce multiple
API dependencies in a single API Manifest plugin.

- adds a test case where we connect to two different APIs using a single
plugin:
  - Microsoft Graph authenticating with MSAL
  - NASA API authenticating with API key

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
- well technically this is a breaking change to the public method
signature, however, we haven't published the package yet and it was
behind an experimental flag :)

Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code openapi Issues related to the OpenAPI function importer
Projects
Archived in project
4 participants