Missed default values for DateTimeOffset in Swagger Model Schema

How can I get default values in the swagger model Schema for DateTimeOffset properties e.g. timestamp:

like “timestamp” : “0001-01-01T00:00:00.000+00:00” ?

I have already set JsConfig.DateHandler = DateHandler.ISO8601.

The default values in Open API/Swagger needs to map a pre-defined Swagger DataType independently from the Serializer. I’ve configured it to use the Swagger date format in this commit.

This change is available from v5.0.3 that’s now available on MyGet.

Thanks…but it seems to be that the problem is https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Interfaces/SwaggerType.cs

by changing:

namespace ServiceStack
{
    public static class SwaggerType
    {
        public const string Byte = "byte";
        public const string Boolean = "boolean";
        public const string Int = "int";
        public const string Long = "long";
        public const string Float = "float";
        public const string Double = "double";
        public const string String = "string";
        public const string Date = "Date";
        public const string Array = "Array";
    }
}

to:

namespace ServiceStack
{
    public static class SwaggerType
    {
        public const string Byte = "byte";
        public const string Boolean = "boolean";
        public const string Int = "int";
        public const string Long = "long";
        public const string Float = "float";
        public const string Double = "double";
        public const string String = "string";
        public const string Date = "0001-01-01T00:00:00.000";
        public const string DateTimeOffset = "0001-01-01T00:00:00.000+00:00";
        public const string Array = "Array";
    }
}

because ServiceStack Swagger uses /resources (ServiceStack.Api.Swagger)

Adding a const doesn’t do anything itself, check my commit I added an entry for DateTimeFormat in SwaggerApiService as well although you should consider SwaggerFeature to be in maintenance mode and should consider switching to OpenApiFeature which uses the newer Swagger 2.0 spec.

Ah…ok thanks now I get the picture.