You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[JsonConverter(typeof(JsonInheritanceConverter), "discriminator")] as advised above does not compile for the reason JsonConverter constructor takes a single parameter.
It appears more likely it should be something like
https://github.com/RicoSuter/NJsonSchema/wiki/Inheritance
Using System.Text.Json
[JsonConverter(typeof(JsonInheritanceConverter), "discriminator")]
as advised above does not compile for the reason JsonConverter constructor takes a single parameter.It appears more likely it should be something like
[JsonInheritanceConverter(typeof(MyInheritingType), "discriminator")]
However this does not have the desired effect the schema only includes the base type
"$ref": "#/components/schemas/MyBaseType"
Where I would be expecting
"oneOf": [ { "$ref": "#/components/schemas/MyInheritingType" } ]
Or something similar.
Does https://github.com/RicoSuter/NJsonSchema/wiki/Inheritance still represent upto data documentation?
Is there something else I need to get this to work?
BTW I am using NJsonSchema transitively Via FastEndpoints and using .net8.
The text was updated successfully, but these errors were encountered: