-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codebugSomething isn't workingSomething isn't workingopenapiIssues related to the OpenAPI function importerIssues related to the OpenAPI function importer
Description
Describe the bug
According to the OpenAPI spec, the servers array might contain path variables which can be replaced with user defined values to build a proper URL. Semantic Kernel currently assumes that the URL is a valid URL and fails to create a plugin if it isn't.
An example OpenAPI:
{
"openapi": "3.0.3",
"info": {
"title": "Test Schema",
"version": "0"
},
"servers": [
{
"url": "https://example.com/{version}",
"variables": {
"version": {
"default": "v2",
"enum": [
"v1", "v2"
]
}
}
}
],
"paths": {
"/": {
"get": {
"operationId": "getRoot",
"responses": {
"default": {
"description": ""
}
}
}
}
}
}Expected behavior
Semantic Kernel should fill in the parameters before constructing a request. In the above example, the getRoot operation request uses the URL https://example.com/{version}/ instead of https://example.com/v2/
Platform
- OS: Windows
- IDE: VS Code
- Language: C#
- Source: main branch of repository
Additional context
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codebugSomething isn't workingSomething isn't workingopenapiIssues related to the OpenAPI function importerIssues related to the OpenAPI function importer
Type
Projects
Status
Sprint: Done