Skip to content

How to configure JsonSchemaExporter for custom types? #115196

Answered by elgonzo
vengut asked this question in Q&A
Discussion options

You must be logged in to vote

Right now there isn't a public API for this. However, there is an API proposal to support scenarios like this: #105769. Basically, you either wait for this API to be realized in some form -- whenever this might be i don't know (it's currently a milestone for 10.0.0, but i am not involved with the .NET team and don't know how good the chances are for such a feature really becoming part of for the .NET 10 release), or you have to do this quasi "manually" using a TransformSchemaNode delegate, in which you somehow detect whether the property or the type of a property is being associated with one of your JsonConverters and then modify the Json schema for that property accordingly...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vengut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants