mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-27 19:41:08 +01:00
* Add HandlebarsSettings class * DefaultAllowedHandlebarsHelpers * HB - 2.5.0-preview-01 * readme * fix * readme * Handlebars.Net.Helpers Version="2.5.0"
50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
// Copyright © WireMock.Net
|
|
|
|
using HandlebarsDotNet.Helpers.Enums;
|
|
using JetBrains.Annotations;
|
|
using WireMock.Types;
|
|
|
|
namespace WireMock.Settings;
|
|
|
|
/// <summary>
|
|
/// HandlebarsSettings
|
|
/// </summary>
|
|
[PublicAPI]
|
|
public class HandlebarsSettings
|
|
{
|
|
internal static readonly Category[] DefaultAllowedHandlebarsHelpers =
|
|
[
|
|
Category.Boolean,
|
|
Category.Constants,
|
|
Category.DateTime,
|
|
Category.Enumerable,
|
|
Category.Humanizer,
|
|
Category.JsonPath,
|
|
Category.Math,
|
|
Category.Object,
|
|
Category.Random,
|
|
Category.Regex,
|
|
Category.String,
|
|
Category.Url,
|
|
Category.Xeger,
|
|
Category.XPath,
|
|
Category.Xslt
|
|
];
|
|
|
|
/// <summary>
|
|
/// Defines the allowed custom HandlebarsHelpers which can be used. Possible values are:
|
|
/// - <see cref="CustomHandlebarsHelpers.None"/> (Default)
|
|
/// - <see cref="CustomHandlebarsHelpers.File"/>
|
|
/// - <see cref="CustomHandlebarsHelpers.All"/>
|
|
/// </summary>
|
|
[PublicAPI]
|
|
public CustomHandlebarsHelpers AllowedCustomHandlebarsHelpers { get; set; } = CustomHandlebarsHelpers.None;
|
|
|
|
/// <summary>
|
|
/// Defines the allowed HandlebarHelpers which can be used.
|
|
///
|
|
/// By default, all categories except <see cref="Category.DynamicLinq"/> and <see cref="Category.Environment"/> are registered.
|
|
/// </summary>
|
|
[PublicAPI]
|
|
public Category[] AllowedHandlebarsHelpers { get; set; } = DefaultAllowedHandlebarsHelpers;
|
|
} |