Describe the bug
I have a polymorphic object that has collection properties (List) that is used inside another polymorphic object. This results in the library generating stuff like:
"$ref": "#/components/schemas/polymorphicClass/anyOf/0/properties/polymorphicClassThatIsAProperty/anyOf/8/properties/intList"
Instead of
"type": [
"null",
"array"
],
"items": {
"type": "number",
"format": "int32"
}
OpenApi File To Reproduce
I cannot share the file. Simply create this structure:
[JsonPolymorphic(TypeDiscriminatorPropertyName = "type")]
[JsonDerivedType(typeof(B), typeDiscriminator: "test")]
public abstract class A
{
public C TestProperty { get; set; }
}
public class B : A
{
}
[JsonPolymorphic(TypeDiscriminatorPropertyName = "otherType")]
[JsonDerivedType(typeof(D), typeDiscriminator: "test1")]
public abstract class C
{
}
public class D : C
{
public List<int> TestInts { get; set; }
}
Expected behavior
Correct array spec should be generated
Describe the bug
I have a polymorphic object that has collection properties (List) that is used inside another polymorphic object. This results in the library generating stuff like:
Instead of
OpenApi File To Reproduce
I cannot share the file. Simply create this structure:
Expected behavior
Correct array spec should be generated