All Downloads are FREE. Search and download functionalities are using the official Maven repository.

csharp.SwaggerDateConverter.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{>partial_header}}
using Newtonsoft.Json.Converters;

namespace {{packageName}}.Client
{
    /// 
    /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339
    /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types
    /// 
    public class SwaggerDateConverter : IsoDateTimeConverter
    {
        /// 
        /// Initializes a new instance of the  class.
        /// 
        public SwaggerDateConverter()
        {
            // full-date   = date-fullyear "-" date-month "-" date-mday
            DateTimeFormat = "yyyy-MM-dd";
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy