See test at https://github.com/microsoft/OpenAPI.NET.OData/blob/a578631d9a7ff4bb2590e8cf1d0c3291cce48fdf/test/Microsoft.OpenAPI.OData.Reader.Tests/Generator/OpenApiSchemaGeneratorTests.cs#L982
This is a regression of the NRT work at #2146
That updated this check that no longer allows writing ReadOnly when the propertyName is not set.
|
if (!string.IsNullOrEmpty(propertyName) && propertyName is not null && !parentRequiredProperties.Contains(propertyName)) |