Skip to content

Commit

Permalink
.Net: More API Manifest plugin examples from Microsoft Graph (#5098)
Browse files Browse the repository at this point in the history
### Motivation and Context

These examples were previously blocked by issue #4991

### Description

- Adds three more API Manifest plugin examples.

### 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 😄

Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
  • Loading branch information
zengin and SergeyMenshykh committed Feb 22, 2024
1 parent f8e563a commit 38349e9
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dotnet/samples/KernelSyntaxExamples/Example83_ApiManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public Example83_ApiManifest(ITestOutputHelper output) : base(output)
{
// function names are sanitized operationIds from the OpenAPI document
new object[] { "MessagesPlugin", "meListMessages", new KernelArguments { { "_top", "1" } }, "MessagesPlugin" },
new object[] { "DriveItemPlugin", "driverootGetChildrenContent", new KernelArguments { { "driveItem-Id", "test.txt" } }, "DriveItemPlugin", "MessagesPlugin" },
new object[] { "ContactsPlugin", "meListContacts", new KernelArguments() { { "_count", "true" } }, "ContactsPlugin", "MessagesPlugin" },
new object[] { "CalendarPlugin", "mecalendarListEvents", new KernelArguments() { { "_top", "1" } }, "CalendarPlugin", "MessagesPlugin"},
};

[Theory, MemberData(nameof(s_parameters))]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"applicationName": "SemanticKernel",
"publisher": {
"name": "publisher-name",
"contactEmail": "publisher-email@example.com"
},
"apiDependencies": {
"microsoft.graph": {
"apiDescriptionUrl": "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/graphexplorer.yaml",
"requests": [
{
"method": "Get",
"uriTemplate": "/me/calendar/events"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"applicationName": "SemanticKernel",
"publisher": {
"name": "publisher-name",
"contactEmail": "publisher-email@example.com"
},
"apiDependencies": {
"microsoft.graph": {
"apiDescriptionUrl": "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/graphexplorer.yaml",
"requests": [
{
"method": "Get",
"uriTemplate": "/me/contacts"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"applicationName": "SemanticKernel",
"publisher": {
"name": "publisher-name",
"contactEmail": "publisher-email@example.com"
},
"apiDependencies": {
"microsoft.graph": {
"apiDescriptionUrl": "https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/openapi/v1.0/graphexplorer.yaml",
"requests": [
{
"method": "Get",
"uriTemplate": "/drive/root/children/{driveItem-id}/content"
}
]
}
}
}

0 comments on commit 38349e9

Please sign in to comment.