aspnetcore
aspnetcore copied to clipboard
[OpenAPI] Use invariant culture for TextWriter
Use invariant culture for TextWriter
Use culture-invariant TextWriter implementation for OpenAPI.
Description
- Ensure OpenAPI documents are written to a culture-invariant
TextWriterimplementation. - Add/update unit/integration tests to ensure the invariant culture is used to generate the OpenAPI document regardless of the current culture.
- Add support for emitting
exclusiveMinimum/exclusiveMaximuminstead ofminimum/maximumwhere relevant based on the values ofRangeAttributeproperties.
~~I couldn't replicate this issue in .NET 10, I'm guessing Microsoft.OpenApi has had some internal refactoring that means that it's no longer using an overload on TextWriter that was hitting this (unless I messed up my test to repro it somehow).~~
- Contributes to #60628.
- Contributes to #61965.