Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
OpenApiSchemaComparer uses code like hashCode.Add(obj.Properties.Count);
. In custom schema transforms where I might want to replace allof , anyof, or properties, intuitively I would set unwanted properties to null. Either the setter should prevent this, or the obj.Properties.Count
should be obj.Properties?.Count??0
or otherwise take care of nulls.
Expected Behavior
Not crash when a schema property is null.
Steps To Reproduce
Custom schema transform - set Properties to null. OpenApi doc gen and Scalar result have missing elements.
Exceptions (if any)
Object reference not set to an instance of an object.
.NET Version
9
Anything else?
No response