csharp-netcore.OpenAPIDateConverter.mustache Maven / Gradle / Ivy
{{>partial_header}}
using Newtonsoft.Json.Converters;
namespace {{packageName}}.Client
{
///
/// Formatter for 'date' openapi formats ss defined by full-date - RFC3339
/// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types
///
public class OpenAPIDateConverter : IsoDateTimeConverter
{
///
/// Initializes a new instance of the class.
///
public OpenAPIDateConverter()
{
// full-date = date-fullyear "-" date-month "-" date-mday
DateTimeFormat = "yyyy-MM-dd";
}
}
}