You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
in open OpenApiDocumentParser there is a bug whille retreiving the media type, from the response schema when the content has multiple attribute (in my case the x-api-version was also described)
To Reproduce
In the OpenApi schema we can have multiple type of information describing the content . In my case the description of the schema was "text/plain; x-api-version=2.0"
Expected behavior
OpenApiDocumentParser shall be able to retreive the mediatype from a complex content description
Platform
OS: Windows
IDE: Visual Studio
Language: C#
Source: Latest des
Additional context
Impact on the following methods of OpenApiDocumentParser
CreateRestApiOperationPayload
CreateRestApiOperationExpectedResponses
the line cause this error (in both methods)
var mediaType = s_supportedMediaTypes.FirstOrDefault(response.Value.Content.ContainsKey);
we should split and trim the splitted value to retrieve the mediatype
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: OpenApiDocumentParser fail when X-API-version is provide in the content key
.Net: Bug: OpenApiDocumentParser fail when X-API-version is provide in the content key
Dec 12, 2024
… the content key (#9959)
### Motivation and Context
1. Closes#9952
2. Also includes an OpenAI text embedding sample
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
### 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]>
Describe the bug
in open OpenApiDocumentParser there is a bug whille retreiving the media type, from the response schema when the content has multiple attribute (in my case the x-api-version was also described)
To Reproduce
In the OpenApi schema we can have multiple type of information describing the content . In my case the description of the schema was "text/plain; x-api-version=2.0"
Expected behavior
OpenApiDocumentParser shall be able to retreive the mediatype from a complex content description
Platform
Additional context
Impact on the following methods of OpenApiDocumentParser
the line cause this error (in both methods)
var mediaType = s_supportedMediaTypes.FirstOrDefault(response.Value.Content.ContainsKey);
we should split and trim the splitted value to retrieve the mediatype
The text was updated successfully, but these errors were encountered: