I am using Swashbuckle to generate swagger documentation for an ASP.NET core API I am writing. In my API, I am using a lot of custom Json converters, so the json I am receiving and returning doesn't look exactly like how the C# class is defined. For example, I may have a class like this:
public class MyModel
{
private MyClass complicatedField;
}
which will be serialized as
{
"complicatedField": "String representation of the object"
}
However, Swashbuckle documents it as
{
"complicatedField": {/*Json object of all the fields MyClass has*/}
}
How do I tell Swashbuckle how my models get serialized and deserialized?