-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.Net: ImportPluginFromOpenApiAsync will ignore operations with unsupp…
…orted content types (#9736) ### Motivation and Context Closes #8971 ### Description Operations with unsupported content types should be ignored rather than causing the import to fail. ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] 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 - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 --------- Co-authored-by: SergeyMenshykh <[email protected]>
- Loading branch information
1 parent
f8d7a7e
commit f4b6ac1
Showing
4 changed files
with
113 additions
and
6 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
83 changes: 83 additions & 0 deletions
83
dotnet/src/Functions/Functions.UnitTests/OpenApi/TestPlugins/multipart-form-data.json
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,83 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "API with Multipart Form Data", | ||
"version": "1.0.0", | ||
"description": "API with Multipart Form Data" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://api.example.com" | ||
} | ||
], | ||
"paths": { | ||
"/api/items": { | ||
"post": { | ||
"operationId": "createItem", | ||
"requestBody": { | ||
"content": { | ||
"multipart/form-data": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"Value": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"encoding": { | ||
"Value": { | ||
"style": "form" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Success", | ||
"content": { | ||
"text/plain": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GenericResult" | ||
} | ||
}, | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GenericResult" | ||
} | ||
}, | ||
"text/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GenericResult" | ||
} | ||
} | ||
} | ||
}, | ||
"401": { | ||
"description": "Unauthorized" | ||
}, | ||
"403": { | ||
"description": "Forbidden" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"GenericResult": { | ||
"type": "object", | ||
"required": [ "type" ], | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
} | ||
}, | ||
"discriminator": { | ||
"propertyName": "type" | ||
} | ||
} | ||
} | ||
} | ||
} |