This repository was archived by the owner on Apr 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-20
lines changed
src/NET6CustomLibrary/Extensions Expand file tree Collapse file tree 1 file changed +20
-20
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments