Skip to content

Bug: Incorrect URL Encoding in API Call #7260

Description

@sunnymitramsft

Description:
When making an API call to GitHub using SemanticKernel, the repository name in the URL is incorrectly URL-encoded, leading to API failure.

For example, if the repository value is "message-extensions/TicketApi", SemanticKernel makes the API call to:

https://api.github.com/repos/message-extensions%2FTicketApi/issues/1

instead of:

https://api.github.com/repos/message-extensions/TicketApi/issues/1

Expected Behavior:
The API call should be made to https://api.github.com/repos/message-extensions/TicketApi/issues/1 without URL-encoding the forward slash in the repository name.

Actual Behavior:
The API call is made to https://api.github.com/repos/message-extensions%2FTicketApi/issues/1, causing the API to fail.

Example API Specification:

/repos/{repo}/issues/{issue_number}:
  get:
    operationId: getIssue
    summary: Get a specific issue
    description: Fetch a specific issue by its issue number from a repository.
    parameters:
      - name: repo
        in: path
        description: Indicates the repository name. It's a required property.
        required: true
        schema:
          type: string
      - name: issue_number
        in: path
        description: Indicates the issue number. It's a required property.
        required: true
        schema:
          type: integer

Request Example:

{
  "repo": "message-extensions/TicketApi",
  "issue_number": 1
}

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status
Sprint: Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions