Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

Commit c2103cb

Browse files
committed
Rimosso metodo statico Obsolete
1 parent 067233c commit c2103cb

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/NET6CustomLibrary/Extensions/DependencyInjection.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,26 @@ public static IServiceCollection AddDateTimeOnlyAttributes(this IServiceCollecti
9090
}
9191
#endregion
9292

93-
#region "SWAGGER"
94-
[Obsolete("This method is deprecated and will be removed. See https://bit.ly/40XbcAs link for new documentation.", true)]
95-
public static SwaggerGenOptions AddDateTimeSwaggerGenOptions(this SwaggerGenOptions options)
96-
{
97-
options.MapType<DateOnly>(() => new OpenApiSchema
98-
{
99-
Type = "string",
100-
Format = "date"
101-
});
102-
103-
options.MapType<TimeOnly>(() => new OpenApiSchema
104-
{
105-
Type = "string",
106-
Format = "time",
107-
Example = new OpenApiString(TimeOnly.FromDateTime(System.DateTime.Now).ToString("HH:mm:ss"))
108-
});
109-
110-
return options;
111-
}
112-
#endregion
93+
//#region "SWAGGER"
94+
//[Obsolete("This method is deprecated and will be removed. See https://bit.ly/40XbcAs link for new documentation.", true)]
95+
//public static SwaggerGenOptions AddDateTimeSwaggerGenOptions(this SwaggerGenOptions options)
96+
//{
97+
// options.MapType<DateOnly>(() => new OpenApiSchema
98+
// {
99+
// Type = "string",
100+
// Format = "date"
101+
// });
102+
103+
// options.MapType<TimeOnly>(() => new OpenApiSchema
104+
// {
105+
// Type = "string",
106+
// Format = "time",
107+
// Example = new OpenApiString(TimeOnly.FromDateTime(System.DateTime.Now).ToString("HH:mm:ss"))
108+
// });
109+
110+
// return options;
111+
//}
112+
//#endregion
113113

114114
#region "DB Context"
115115
public static IServiceCollection AddDbContextGenericsMethods<TDbContext>(this IServiceCollection services) where TDbContext : DbContext

0 commit comments

Comments
 (0)