-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: Fixed an issue where the schema property was missing when usi…
…ng the OpenAPI plugin with the get method. (#8502) Fixed an issue where the schema property was missing when using the OpenAPI plugin with the get method. ### Motivation and Context This Pull Request is based on Issue #8423. When loading an openapi plugin that uses the get method, properties other than the "type" key in parameters.schema is missing. ### Description The parameters.schema includes properties other than the "type" key, such as "description", which is used for the llm to make judgments during function calling. Therefore, I modified it to include this information. [openapi schema](https://github.com/OAI/OpenAPI-Specification/blob/4e9d2b3ec859beef08309c414f895c73a793b958/schemas/v3.0/schema.yaml#L658) ### Contribution Checklist - [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: Tao Chen <[email protected]> Co-authored-by: Evan Mattson <[email protected]>
- Loading branch information
1 parent
40e4c1c
commit ac4f394
Showing
4 changed files
with
128 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Todo List API | ||
version: 1.0.0 | ||
description: API for managing todo lists | ||
paths: | ||
/list: | ||
get: | ||
summary: Get todo list | ||
operationId: get_todo_list | ||
description: get todo list from specific group | ||
parameters: | ||
- name: listName | ||
in: query | ||
required: true | ||
description: todo list group name description | ||
schema: | ||
type: string | ||
description: todo list group name | ||
responses: | ||
"200": | ||
description: Successful response | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
task: | ||
type: string | ||
listName: | ||
type: string | ||
|
||
/add: | ||
post: | ||
summary: Add a task to a list | ||
operationId: add_todo_list | ||
description: add todo to specific group | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- task | ||
properties: | ||
task: | ||
type: string | ||
description: task name | ||
listName: | ||
type: string | ||
description: task group name | ||
responses: | ||
"201": | ||
description: Task added successfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters