Updates to Core.Configuration Models to use DefaultValue attribute to allow auto generated JSONSchema to give a default value in schema
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// See LICENSE for more details.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Umbraco.Cms.Core.HealthChecks;
|
||||
|
||||
namespace Umbraco.Cms.Core.Configuration.Models
|
||||
@@ -11,20 +12,27 @@ namespace Umbraco.Cms.Core.Configuration.Models
|
||||
/// </summary>
|
||||
public class HealthChecksNotificationMethodSettings
|
||||
{
|
||||
internal const bool StaticEnabled = false;
|
||||
internal const string StaticVerbosity = "Summary"; // Enum
|
||||
internal const bool StaticFailureOnly = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the health check notification method is enabled.
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; } = false;
|
||||
[DefaultValue(StaticEnabled)]
|
||||
public bool Enabled { get; set; } = StaticEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value for the health check notifications reporting verbosity.
|
||||
/// </summary>
|
||||
public HealthCheckNotificationVerbosity Verbosity { get; set; } = HealthCheckNotificationVerbosity.Summary;
|
||||
[DefaultValue(StaticVerbosity)]
|
||||
public HealthCheckNotificationVerbosity Verbosity { get; set; } = Enum<HealthCheckNotificationVerbosity>.Parse(StaticVerbosity);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the health check notifications should occur on failures only.
|
||||
/// </summary>
|
||||
public bool FailureOnly { get; set; } = false;
|
||||
[DefaultValue(StaticFailureOnly)]
|
||||
public bool FailureOnly { get; set; } = StaticFailureOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value providing provider specific settings for the health check notification method.
|
||||
|
||||
Reference in New Issue
Block a user