microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
22.01k stars 3.28k forks source link

.Net Bug: OpenAPI descriptions with parameters defined under the path item are ignored #8268

Open calebkiage opened 3 months ago

calebkiage commented 3 months ago

Describe the bug According to the OpenAPI spec, parameters are allowed under the path object and should apply to all operations under that path item. Semantic Kernel currently only uses parameters under the operation object.

An example OpenAPI:

{
  "openapi": "3.0.3",
  "info": {
    "title": "Test Schema",
    "version": "0"
  },
  "servers": [
    {"url": "https://localhost:3000"}
  ],
  "paths": {
    "/users/{userId}": {
      "get": {
        "operationId": "getUserById",
        "responses": {
          "default": {
            "description": ""
          }
        }
      },
      "parameters": [
        {
          "name": "userId",
          "in": "path",
          "required": true
        }
      ]
    }
  }
}

Expected behavior Semantic kernel should consider path item parameters as well as operation parameters when building a plugin

Platform

Additional context

markwallace-microsoft commented 3 months ago

Hi @calebkiage thanks for creating this issue. Is this a blocking issue for you and if yes, can you provide some detail on the impact to help us to prioritise this.

calebkiage commented 3 months ago

Hi @markwallace-microsoft, it's not a blocking issue. I'm cataloguing gaps in semantic kernel's OpenAPI support and opening issues for tracking.

github-actions[bot] commented 2 days ago

This issue is stale because it has been open for 90 days with no activity.