-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix OpenAPI Culture formatting for RangeAttribute and Unit Tests #62212
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
Conversation
…d Update tests to write in the InvariantCulture
@captainsafia I've created a PR which makes the failing unit tests green and should resolve a few formatting issues. (So I can make the fix for #61965) I am partially doubting whether this PR is a good thing, yes it fixes the issue, and it should fix it for unit tests, but I think it hides an underlying issue (in Microsoft.OpenAPI) that it writes invalid json when the culture has a |
@dotnet-policy-service agree |
@martincostello let me know if I need to change something or update my branch when the changes made in #62193 are merged. |
@desjoerd I updated #62193 to improve the tests, and now the test changes I made have repro'd the bug you're trying to fix here. Would you mind if I pull your fix commit into my branch? Otherwise it's a bit chicken and egg as my branch can't be merged as another bug causes the tests that detect the bug I'm trying to fix to still fail. 😄 |
Feel free to do that :). (Will I still get the first contribution credit 😜) |
Of course! |
When you've done it and give the 👍 I will close this PR. |
It's now included in #62193. |
Fix OpenAPI Culture formatting for RangeAttribute and Unit Tests
This is to fix unit tests and formatting issues when having a culture with
,
as decimal seperator.Description
This is to fix unit tests and formatting issues when having a culture with
,
as decimal seperator. It fixes the range attribute by formatting it using the target locale. And the xml comment tests by using the FormattingStreamWriter as mentioned in:microsoft/OpenAPI.NET#657 (comment).
Partially Fixes progress for #61965