Skip to content

.Net Bug: OpenAPI descriptions overriding path parameters in operations are not supported #8269

Closed

Description

Describe the bug
According to the OpenAPI spec, parameters in the operation object that match parameters in the path item object should override the path item object descriptions. 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,
            "schema": {
              "type": "integer"
            }
          }
        ]
      },
      "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. If a parameter appears in both the path item and the operation item, the operation item path should be used. In the above OpenAPI, the userId parameter should have a schema with type integer.

Platform

  • OS: Windows
  • IDE: VS Code
  • Language: C#
  • Source: main branch of repository

Additional context
Related to #8268

Activity

  1. markwallace-microsoft commented on Aug 19, 2024

    @markwallace-microsoft
    Contributor

    Hi Caleb Kiage (@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.

  2. github-actions commented on Nov 18, 2024

    @github-actions
    Contributor

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

  3. added
    staleIssue is stale because it has been open for a while and has no activity
    on Nov 18, 2024
  4. markwallace-microsoft commented on Nov 25, 2024

    @markwallace-microsoft
    Contributor

    The SK Open API support does not cover 100% of the Open API specification. As features are requested we aim to provide a functionality very quickly, typically this happens in time for our next weekly release. Closing this issue until we get a customer request where this is a blocking issues.

  5. moved this from Backlog: Planned to Sprint: Done in Semantic Kernelon Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codeenhancementopenapiIssues related to the OpenAPI function importerstaleIssue is stale because it has been open for a while and has no activity

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions