From 9a5cb519b21e727a7aedec2ebc9d39367e4c7859 Mon Sep 17 00:00:00 2001 From: Mark Johnston <42784895+c3pmark@users.noreply.github.com> Date: Mon, 6 Nov 2023 16:12:15 -0600 Subject: [PATCH] docs: fix truncate arguments (#19068) * docs: truncate arg 'suffix' is string, not bool * docs: fix required args for truncate The arguments `ellipsis` and `suffix` are not required. [Refer to VRL source](https://github.com/vectordotdev/vrl/blob/37319dfca17dc5d7637b24455199029cc30eb128/src/stdlib/truncate.rs#L48) to confirm. --- website/cue/reference/remap/functions/truncate.cue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/cue/reference/remap/functions/truncate.cue b/website/cue/reference/remap/functions/truncate.cue index f67e444084a78..7d0c35c2914e8 100644 --- a/website/cue/reference/remap/functions/truncate.cue +++ b/website/cue/reference/remap/functions/truncate.cue @@ -25,7 +25,7 @@ remap: functions: truncate: { This argument is deprecated. An ellipsis (`...`) is appended if this is set to `true` _and_ the `value` string ends up being truncated because it's exceeded the `limit`. """ - required: true + required: false type: ["boolean"] }, { @@ -34,8 +34,8 @@ remap: functions: truncate: { A custom suffix (`...`) will be appended to truncated strings. This is ignored if "ellipsis" is set to true for backwards compatibility. """ - required: true - type: ["boolean"] + required: false + type: ["string"] }, ] internal_failure_reasons: []