File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 35
35
using Microsoft . Extensions . DependencyInjection ;
36
36
using Microsoft . OpenApi . Models ;
37
37
using Newtonsoft . Json ;
38
- using Newtonsoft . Json . Converters ;
39
38
using Newtonsoft . Json . Serialization ;
40
39
41
40
namespace ArchiSteamFarm . IPC {
@@ -220,18 +219,20 @@ public void ConfigureServices(IServiceCollection services) {
220
219
mvc . AddApiExplorer ( ) ;
221
220
#endif
222
221
223
- // Add JSON formatters that will be used as default ones if no specific formatters are asked for
224
- // Fix default contract resolver to use original names and not a camel case and add debugging aid while we're at it
225
222
#if NETFRAMEWORK
223
+ // Add JSON formatters that will be used as default ones if no specific formatters are asked for
226
224
mvc . AddJsonFormatters ( ) ;
227
225
228
226
mvc . AddJsonOptions (
229
227
#else
230
228
mvc . AddNewtonsoftJson (
231
229
#endif
232
230
options => {
231
+ // Fix default contract resolver to use original names and not a camel case
233
232
options . SerializerSettings . ContractResolver = new DefaultContractResolver ( ) ;
234
- options . SerializerSettings . Converters . Add ( new StringEnumConverter ( ) ) ;
233
+
234
+ // TODO: Enable this again once ASF-ui adds support in https://github.com/JustArchiNET/ASF-ui/issues/871
235
+ //options.SerializerSettings.Converters.Add(new StringEnumConverter());
235
236
236
237
if ( Debugging . IsUserDebugging ) {
237
238
options . SerializerSettings . Formatting = Formatting . Indented ;
You can’t perform that action at this time.
0 commit comments