Last active
September 27, 2023 09:21
-
-
Save trnktms/210046c45dbdc0ff84111234498520a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Startup | |
{ | |
... | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
... | |
services.AddControllers().AddJsonOptions(Constants.JsonOptionsNames.DeliveryApi, options => | |
{ | |
// To resolve System.Text.Json polymorphic type resolving issue for the query controller | |
options.JsonSerializerOptions.TypeInfoResolver = new FallbackDeliveryApiJsonTypeResolver(); | |
}); | |
// Overwrite the default ApiContentResponseBuilder to add "system" section | |
services.AddSingleton<IApiContentResponseBuilder, ExtendedApiContentResponseBuilder>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment