File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11using iGotify_Notification_Assist . Services ;
2+ using Microsoft . AspNetCore . Http . Json ;
3+ using Microsoft . AspNetCore . Identity ;
24using Microsoft . OpenApi . Models ;
35using Scalar . AspNetCore ;
46using Environments = iGotify_Notification_Assist . Services . Environments ;
810// Add services to the container.
911builder . Services . AddCors ( ) ;
1012
11- builder . Services . AddControllers ( opt => { opt . SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true ; } )
13+ builder . Services . AddControllers ( opt =>
14+ {
15+ opt . SuppressImplicitRequiredAttributeForNonNullableReferenceTypes = true ;
16+ } )
1217 . AddJsonOptions ( opt =>
1318 {
1419 opt . JsonSerializerOptions . PropertyNamingPolicy = null ;
1520 opt . JsonSerializerOptions . PropertyNameCaseInsensitive = true ;
1621 } ) ;
22+ builder . Services . Configure < JsonOptions > ( options =>
23+ {
24+ options . SerializerOptions . PropertyNameCaseInsensitive = true ; // Enable case-insensitivity
25+ options . SerializerOptions . PropertyNamingPolicy = null ; // Preserve exact casing
26+ } ) ;
1727
1828builder . Services . AddSingleton ( builder . Configuration ) ;
1929builder . Services . AddOpenApi ( ) ;
20-
2130builder . Services . AddTransient < IStartupFilter , StartUpBuilder > ( ) ;
2231
2332var app = builder . Build ( ) ;
Original file line number Diff line number Diff line change 1919 <PackageReference Include =" Microsoft.AspNetCore.OpenApi" Version =" 9.0.0" />
2020 <PackageReference Include =" Microsoft.Data.Sqlite" Version =" 9.0.0" />
2121 <PackageReference Include =" Newtonsoft.Json" Version =" 13.0.3" />
22- <PackageReference Include =" Scalar.AspNetCore" Version =" 1.2.72 " />
22+ <PackageReference Include =" Scalar.AspNetCore" Version =" 1.2.75 " />
2323 <PackageReference Include =" secntfy.nuget" Version =" 1.0.5" />
2424 <PackageReference Include =" Websocket.Client" Version =" 5.1.2" />
2525 </ItemGroup >
You can’t perform that action at this time.
0 commit comments