Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Invariant culture for OpenApiSchema conversion #4540

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

SergeyMenshykh
Copy link
Member

Closes : #4504

Motivation, Context and Description

The issue occurred during the conversion from OpenApiSchema to KernelJsonSchema on environments with a culture that uses a comma as a decimal separator. To resolve this, the OpenApiSchemaExtensions.ToJsonSchema method has been updated to utilize the invariant culture for conversion instead of using current culture.

Sorry, something went wrong.

@SergeyMenshykh SergeyMenshykh requested a review from a team as a code owner January 9, 2024 20:08
@shawncal shawncal added the .NET Issue or Pull requests regarding .NET code label Jan 9, 2024
@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Jan 10, 2024
Merged via the queue into microsoft:main with commit a843f47 Jan 10, 2024
@SergeyMenshykh SergeyMenshykh deleted the json-serialization-fix branch January 10, 2024 12:50
Bryan-Roe pushed a commit to Bryan-Roe-ai/semantic-kernel that referenced this pull request Oct 6, 2024
Closes : microsoft#4504

### Motivation, Context and Description
The issue occurred during the conversion from OpenApiSchema to
KernelJsonSchema on environments with a culture that uses a comma as a
decimal separator. To resolve this, the
OpenApiSchemaExtensions.ToJsonSchema method has been updated to utilize
the invariant culture for conversion instead of using current culture.

<!-- Before submitting this PR, please make sure: -->

- [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 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: Incorrect Decimal Separator in JSON Serialization Affects Parsing
4 participants