I have an ASP.NET program that uses Swagger to provide API docs. Current;y we have one endpoint that takes a Date value like below:
{
"region": "string",
"date": "2023-07-27T13:07:05.359Z"
}
and its corresponding class is defined as:
{
[Serializable]
public class Msg
{
public string Region { get; set; }
public DateTime? Date { get; set; }
}
The problem is, Msg
is defined in a separate library and we cant directly change any or it. But we want to revise the Json examle value to:
{
"region": "string",
"date": "2023-07-27"
}
Is this possible?