From 33e7fb457f082b6921529c9d123e77288cdb2fef Mon Sep 17 00:00:00 2001 From: Bart Koelman Date: Wed, 8 Apr 2020 15:15:08 +0200 Subject: [PATCH] Disabled resource hooks by default, as they are still experimental --- src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs | 1 + src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs b/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs index fb2ea4fd77..d0f0fa73ff 100644 --- a/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs +++ b/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs @@ -45,6 +45,7 @@ public virtual void ConfigureServices(IServiceCollection services) options.IncludeTotalRecordCount = true; options.LoadDatabaseValues = true; options.ValidateModelState = true; + options.EnableResourceHooks = true; }, discovery => discovery.AddCurrentAssembly()); // once all tests have been moved to WebApplicationFactory format we can get rid of this line below diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs index 6466216a36..a7a7edda7b 100644 --- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs +++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs @@ -30,11 +30,10 @@ public class JsonApiOptions : IJsonApiOptions public bool IncludeExceptionStackTraceInErrors { get; set; } = false; /// - /// Whether or not ResourceHooks are enabled. - /// - /// Default is set to + /// Whether or not resource hooks are enabled. + /// This is currently an experimental feature and defaults to . /// - public bool EnableResourceHooks { get; set; } = true; + public bool EnableResourceHooks { get; set; } = false; /// /// Whether or not database values should be included by default