diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index f1d014b76a..0a10835e3c 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -214,6 +214,8 @@ public class AspNetCoreApiDescriptionModelProvider : IApiDescriptionModelProvide type == typeof(void) || type == typeof(Enum) || type == typeof(ValueType) || + type == typeof(DateOnly) || + type == typeof(TimeOnly) || TypeHelper.IsPrimitiveExtended(type)) { return; diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs index b439a5a07b..1efa6c4f29 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Reflection/TypeHelper.cs @@ -257,6 +257,14 @@ public static class TypeHelper { return "string"; } + else if (type.FullName == "System.DateOnly") + { + return "string"; + } + else if (type.FullName == "System.TimeOnly") + { + return "string"; + } else if (type == typeof(TimeSpan)) { return "string"; diff --git a/npm/ng-packs/packages/schematics/src/constants/system-types.ts b/npm/ng-packs/packages/schematics/src/constants/system-types.ts index 19a8eee259..d64c36d1b8 100644 --- a/npm/ng-packs/packages/schematics/src/constants/system-types.ts +++ b/npm/ng-packs/packages/schematics/src/constants/system-types.ts @@ -5,6 +5,8 @@ export const SYSTEM_TYPES = new Map([ ['Collections.Generic.Dictionary', 'Record'], ['DateTime', 'string'], ['DateTimeOffset', 'string'], + ['DateOnly', 'string'], + ['TimeOnly', 'string'], ['Decimal', 'number'], ['Double', 'number'], ['Guid', 'string'],