From a25f68a022819e9bbe37e43e3ad1b8901f805d3d Mon Sep 17 00:00:00 2001 From: Ruud Senden <8635138+rsenden@users.noreply.github.com> Date: Tue, 14 May 2024 14:48:44 +0200 Subject: [PATCH] chore: Add type info to action schema descriptions --- .../action/model/AbstractActionStep.java | 2 +- .../model/AbstractActionStepForEach.java | 6 ++-- .../AbstractActionStepUpdateProperty.java | 6 ++-- .../cli/common/action/model/Action.java | 20 ++++++------- .../action/model/ActionDefaultValues.java | 2 +- .../common/action/model/ActionParameter.java | 14 +++++----- .../action/model/ActionRequestTarget.java | 6 ++-- .../cli/common/action/model/ActionStep.java | 28 +++++++++---------- .../common/action/model/ActionStepAppend.java | 2 +- .../common/action/model/ActionStepCheck.java | 8 +++--- .../common/action/model/ActionStepFcli.java | 6 ++-- .../action/model/ActionStepForEach.java | 4 +-- .../action/model/ActionStepRequest.java | 22 +++++++-------- .../common/action/model/ActionStepUnset.java | 2 +- .../common/action/model/ActionStepWrite.java | 6 ++-- .../cli/common/action/model/ActionUsage.java | 4 +-- .../action/model/ActionValueTemplate.java | 4 +-- 17 files changed, 71 insertions(+), 71 deletions(-) diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStep.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStep.java index 39c6ece063..b466498c5e 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStep.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStep.java @@ -23,6 +23,6 @@ @Reflectable @NoArgsConstructor @Data public abstract class AbstractActionStep implements IActionStep { - @JsonPropertyDescription("Optional: Only execute this step if the given if-expression evaluates to 'true'") + @JsonPropertyDescription("Optional SpEL template expression: Only execute this step if the given if-expression evaluates to 'true'") @JsonProperty(value = "if", required = false) private TemplateExpression _if; } \ No newline at end of file diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepForEach.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepForEach.java index c56cd797a6..625033c2bf 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepForEach.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepForEach.java @@ -29,13 +29,13 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public abstract class AbstractActionStepForEach extends AbstractActionStep { - @JsonPropertyDescription("Required: Name to assign to each individual record being processed. Can be referenced in other forEach properties and nested steps using ${name}.") + @JsonPropertyDescription("Required string: Name to assign to each individual record being processed. Can be referenced in other forEach properties and nested steps using ${name}.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Required: Steps to be executed for each individual record.") + @JsonPropertyDescription("Required list: Steps to be executed for each individual record.") @JsonProperty(value = "do", required = true) private List _do; - @JsonPropertyDescription("Optional: Stop processing any further records if the breakIf expression evaluates to 'true'.") + @JsonPropertyDescription("Optional SpEL template expression: Stop processing any further records if the breakIf expression evaluates to 'true'.") @JsonProperty(required = false) private TemplateExpression breakIf; /** diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepUpdateProperty.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepUpdateProperty.java index 3c993855bb..efa66a1dc4 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepUpdateProperty.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/AbstractActionStepUpdateProperty.java @@ -27,13 +27,13 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public abstract class AbstractActionStepUpdateProperty extends AbstractActionStep implements IActionStepValueSupplier { - @JsonPropertyDescription("Required: Name to assign to the outcome of this operation. Can be referenced in subsequent steps using ${name}.") + @JsonPropertyDescription("Required string: Name to assign to the outcome of this operation. Can be referenced in subsequent steps using ${name}.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Required if 'valueTemplate' is not specified: Value to be assigned or appended to the given name.") + @JsonPropertyDescription("Required SpEL template expression if 'valueTemplate' is not specified: Value to be assigned or appended to the given name.") @JsonProperty(required = false) private TemplateExpression value; - @JsonPropertyDescription("Required if 'value' is not specified: Name of a value template to be evaluated, assigning or appending the outcome of the value template to the given set/append name.") + @JsonPropertyDescription("Required string if 'value' is not specified: Name of a value template to be evaluated, assigning or appending the outcome of the value template to the given set/append name.") @JsonProperty(required = false) private String valueTemplate; public final void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/Action.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/Action.java index be69e07c77..2fbabd3300 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/Action.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/Action.java @@ -56,34 +56,34 @@ @Data @JsonClassDescription("Fortify CLI action definition") public class Action implements IActionElement { - @JsonPropertyDescription("Read-only: Action name, inferred from file name.") + @JsonPropertyDescription("Read-only string: Action name, inferred from file name.") @JsonProperty(access = Access.READ_ONLY) private String name; - @JsonPropertyDescription("Read-only: Whether this is a custom action, inferred from where the action is loaded from.") + @JsonPropertyDescription("Read-only boolean: Whether this is a custom action, inferred from where the action is loaded from.") @JsonProperty(access = Access.READ_ONLY) private boolean custom; - @JsonPropertyDescription("Read-only: Action signature verification status.") + @JsonPropertyDescription("Read-only object: Action signature verification status.") @JsonProperty(access = Access.READ_ONLY) private SignatureStatus signatureStatus; - @JsonPropertyDescription("Required unless `yaml-language-server` comment with schema location is provided: Schema location.") + @JsonPropertyDescription("Required string unless `yaml-language-server` comment with schema location is provided: Schema location.") @JsonProperty(value = "$schema", required=false) public String schema; - @JsonPropertyDescription("Required: Action usage help.") + @JsonPropertyDescription("Required object: Action usage help.") @JsonProperty(required = true) private ActionUsage usage; - @JsonPropertyDescription("Optional: Action parameters.") + @JsonPropertyDescription("Optional list: Action parameters.") @JsonProperty(required = false) private List parameters; - @JsonPropertyDescription("Optional: Add target URLs and related properties for REST requests.") + @JsonPropertyDescription("Optional list: Add target URLs and related properties for REST requests.") @JsonProperty(required = false) private List addRequestTargets; - @JsonPropertyDescription("Optional: Default values for some specific properties. Currently only used to set a default request target.") + @JsonPropertyDescription("Optional object: Default values for some specific properties. Currently only used to set a default request target.") @JsonProperty(required = false) private ActionDefaultValues defaults; - @JsonPropertyDescription("Required: Steps to be executed when this action is being run.") + @JsonPropertyDescription("Required list: Steps to be executed when this action is being run.") @JsonProperty(required = true) private List steps; - @JsonPropertyDescription("Optional: Value templates used to format data.") + @JsonPropertyDescription("Optional list: Value templates used to format data.") @JsonProperty(required = false) private List valueTemplates; /** Maps/Collections listing action elements. diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionDefaultValues.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionDefaultValues.java index 71b17a3d33..b36eda54a4 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionDefaultValues.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionDefaultValues.java @@ -25,7 +25,7 @@ @Reflectable @NoArgsConstructor @Data public final class ActionDefaultValues implements IActionElement { - @JsonPropertyDescription("Optional: Default request target to use for REST requests.") + @JsonPropertyDescription("Optional string: Default request target to use for REST requests.") @JsonProperty(required = false) private String requestTarget; @Override diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionParameter.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionParameter.java index 1d920399b5..97643598aa 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionParameter.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionParameter.java @@ -29,25 +29,25 @@ @Reflectable @NoArgsConstructor @Data public final class ActionParameter implements IActionElement { - @JsonPropertyDescription("Required: Action parameter name. This will allow the action to accept CLI options named '--' or '-' for single-letter names. Parameter value can be referenced through ${parameters.name} in SpEL template expressions.") + @JsonPropertyDescription("Required string: Action parameter name. This will allow the action to accept CLI options named '--' or '-' for single-letter names. Parameter value can be referenced through ${parameters.name} in SpEL template expressions.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Required: Action parameter description to be shown in action usage help.") + @JsonPropertyDescription("Required string: Action parameter description to be shown in action usage help.") @JsonProperty(required = true) private String description; - @JsonPropertyDescription("Optional: Comma-separated CLI option aliases. This will allow the action to accept CLI options named '--alias' or '-alias' for single-letter aliases. Aliases cannot be referenced in SpEL expressions.") + @JsonPropertyDescription("Optional string: Comma-separated CLI option aliases. This will allow the action to accept CLI options named '--alias' or '-alias' for single-letter aliases. Aliases cannot be referenced in SpEL expressions.") @JsonProperty(required = false) private String cliAliases; - @JsonPropertyDescription("Optional: Action parameter type. Supported types depends on the fcli module (SSC/FoD) from which the action is being run. See built-in actions for examples of supported types.") + @JsonPropertyDescription("Optional string: Action parameter type. Supported types depends on the fcli module (SSC/FoD) from which the action is being run. See built-in actions for examples of supported types.") @JsonProperty(required = false) private String type; - @JsonPropertyDescription("Optional: Action parameter type parameters to allow for additional configuration of the type converter configured through 'type'.") + @JsonPropertyDescription("Optional map: Action parameter type parameters to allow for additional configuration of the type converter configured through 'type'.") @JsonProperty(required = false) private Map typeParameters; - @JsonPropertyDescription("Optional: Default value for this action parameter if no value is specified by the user.") + @JsonPropertyDescription("Optional SpEL template expression: Default value for this action parameter if no value is specified by the user.") @JsonProperty(required = false) private TemplateExpression defaultValue; - @JsonPropertyDescription("Optional: All parameters are required by default, unless this property is set to false.") + @JsonPropertyDescription("Optional boolean: All parameters are required by default, unless this property is set to false.") @JsonProperty(required = false, defaultValue = "true") private boolean required = true; public final void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionRequestTarget.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionRequestTarget.java index 031ec355f6..e8ddc160c0 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionRequestTarget.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionRequestTarget.java @@ -28,13 +28,13 @@ @Reflectable @NoArgsConstructor @Data public final class ActionRequestTarget implements IActionElement { - @JsonPropertyDescription("Required: Request target name, referenceable from 'request' steps.") + @JsonPropertyDescription("Required string: Request target name, referenceable from 'request' steps.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Required: Base URL to use for REST requests to this request target.") + @JsonPropertyDescription("Required SpEL template expression: Base URL to use for REST requests to this request target.") @JsonProperty(required = true) private TemplateExpression baseUrl; - @JsonPropertyDescription("Optional: Headers to be sent to this request target on every request.") + @JsonPropertyDescription("Optional map: Headers to be sent to this request target on every request.") @JsonProperty(required = false) private Map headers; // TODO Add support for next page URL producer diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStep.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStep.java index 471f87952d..a6c0879e7b 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStep.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStep.java @@ -43,46 +43,46 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStep extends AbstractActionStep { - @JsonPropertyDescription("Optional: Execute one or more REST requests.") + @JsonPropertyDescription("Optional list: Execute one or more REST requests.") @JsonProperty(required = false) private List requests; - @JsonPropertyDescription("Optional: Execute one or more fcli commands. For now, only fcli commands that support the standard output options (--output/--store/--to-file) may be used, allowing the JSON output of those commands to be used in subsequent or nested steps. Any console output is suppressed, and any non-zero exit codes will produce an error.") + @JsonPropertyDescription("Optional list: Execute one or more fcli commands. For now, only fcli commands that support the standard output options (--output/--store/--to-file) may be used, allowing the JSON output of those commands to be used in subsequent or nested steps. Any console output is suppressed, and any non-zero exit codes will produce an error.") @JsonProperty(required = false) private List fcli; - @JsonPropertyDescription("Optional: Write a progress message.") + @JsonPropertyDescription("Optional SpEL template expression: Write a progress message.") @JsonProperty(required = false) private TemplateExpression progress; - @JsonPropertyDescription("Optional: Write a warning message to console and log file (if enabled). Note that warning messages will be shown on console only after all action steps have been executed, to not interfere with progress messages.") + @JsonPropertyDescription("Optional SpEL template expression: Write a warning message to console and log file (if enabled). Note that warning messages will be shown on console only after all action steps have been executed, to not interfere with progress messages.") @JsonProperty(required = false) private TemplateExpression warn; - @JsonPropertyDescription("Optional: Write a debug message to log file (if enabled).") + @JsonPropertyDescription("Optional SpEL template expression: Write a debug message to log file (if enabled).") @JsonProperty(required = false) private TemplateExpression debug; - @JsonPropertyDescription("Optional: Throw an exception, thereby terminating action execution.") + @JsonPropertyDescription("Optional SpEL template expression: Throw an exception, thereby terminating action execution.") @JsonProperty(value = "throw", required = false) private TemplateExpression _throw; - @JsonPropertyDescription("Optional: Terminate action execution and return the given exit code.") + @JsonPropertyDescription("OptionalSpEL template expression: Terminate action execution and return the given exit code.") @JsonProperty(value = "exit", required = false) private TemplateExpression _exit; - @JsonPropertyDescription("Optional: Set a data value for use in subsequent steps.") + @JsonPropertyDescription("Optional list: Set a data value for use in subsequent steps.") @JsonProperty(required = false) private List set; - @JsonPropertyDescription("Optional: Append a data value for use in subsequent steps.") + @JsonPropertyDescription("Optional list: Append a data value for use in subsequent steps.") @JsonProperty(required = false) private List append; - @JsonPropertyDescription("Optional: Unset a data value for use in subsequent steps.") + @JsonPropertyDescription("Optional list: Unset a data value for use in subsequent steps.") @JsonProperty(required = false) private List unset; - @JsonPropertyDescription("Optional: Write data to a file, stdout, or stderr. Note that output to stdout and stderr will be deferred until action termination as to not interfere with progress messages.") + @JsonPropertyDescription("Optional list: Write data to a file, stdout, or stderr. Note that output to stdout and stderr will be deferred until action termination as to not interfere with progress messages.") @JsonProperty(required = false) private List write; - @JsonPropertyDescription("Optional: Iterate over a given array of values.") + @JsonPropertyDescription("Optional object: Iterate over a given array of values.") @JsonProperty(required = false) private ActionStepForEach forEach; - @JsonPropertyDescription("Optional: Mostly used for security policy and similar actions to define PASS/FAIL criteria. Upon action termination, check results will be written to console and return a non-zero exit code if the outcome of on or more checks was FAIL.") + @JsonPropertyDescription("Optional list: Mostly used for security policy and similar actions to define PASS/FAIL criteria. Upon action termination, check results will be written to console and return a non-zero exit code if the outcome of on or more checks was FAIL.") @JsonProperty(required = false) private List check; - @JsonPropertyDescription("Optional: Sub-steps to be executed; useful for grouping or conditional execution of multiple steps.") + @JsonPropertyDescription("Optional list: Sub-steps to be executed; useful for grouping or conditional execution of multiple steps.") @JsonProperty(required = false) private List steps; /** diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepAppend.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepAppend.java index ab40fc7f24..f64441271d 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepAppend.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepAppend.java @@ -32,6 +32,6 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepAppend extends AbstractActionStepUpdateProperty { - @JsonPropertyDescription("Optional: Property name to be added or updated in the data object specified by 'name'. If specified, 'name' is considered to be an object, otherwise 'name' is considered to be an array.") + @JsonPropertyDescription("Optional SpEL template expression: Property name to be added or updated in the data object specified by 'name'. If specified, 'name' is considered to be an object, otherwise 'name' is considered to be an array.") @JsonProperty(required = false) private TemplateExpression property; } \ No newline at end of file diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepCheck.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepCheck.java index 1d42ba398b..0a1dcd3a5d 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepCheck.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepCheck.java @@ -32,16 +32,16 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepCheck extends AbstractActionStep { - @JsonPropertyDescription("Required: Display name of this check, to be displayed in PASS/FAIL messages.") + @JsonPropertyDescription("Required string: Display name of this check, to be displayed in PASS/FAIL messages.") @JsonProperty(required = true) private String displayName; - @JsonPropertyDescription("Required if 'passIf' not specified: The outcome of this check will be 'FAIL' if the given expression evaluates to 'true', outcome will be 'PASS' otherwise.") + @JsonPropertyDescription("Required SpEL template expression if 'passIf' not specified: The outcome of this check will be 'FAIL' if the given expression evaluates to 'true', outcome will be 'PASS' otherwise.") @JsonProperty(required = false) private TemplateExpression failIf; - @JsonPropertyDescription("Required if 'failIf' not specified: The outcome of this check will be 'SUCCESS' if the given expression evaluates to 'true', outcome will be 'FAIL' otherwise.") + @JsonPropertyDescription("Required SpEL template expression if 'failIf' not specified: The outcome of this check will be 'SUCCESS' if the given expression evaluates to 'true', outcome will be 'FAIL' otherwise.") @JsonProperty(required = false) private TemplateExpression passIf; - @JsonPropertyDescription("Optional: Define the check result in case the check is being skipped due to conditional execution or no records to be processed in forEach blocks.") + @JsonPropertyDescription("Optional enum value: Define the check result in case the check is being skipped due to conditional execution or no records to be processed in forEach blocks.") @JsonProperty(required = false, defaultValue = "SKIP") private CheckStatus ifSkipped = CheckStatus.SKIP; public final void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepFcli.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepFcli.java index 565d3df227..9058e3dc0d 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepFcli.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepFcli.java @@ -28,13 +28,13 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepFcli extends AbstractActionStep { - @JsonPropertyDescription("Required: Arguments to pass to the fcli command, for example 'ssc appversion list --embed=attrValuesByName'.") + @JsonPropertyDescription("Required SpEL template expression: Arguments to pass to the fcli command, for example 'ssc appversion list --embed=attrValuesByName'.") @JsonProperty(required = true) private TemplateExpression args; - @JsonPropertyDescription("Optional: Name to assign to the outcome of this fcli invocation. Can be referenced in subsequent steps using ${name}.") + @JsonPropertyDescription("Optional string: Name to assign to the outcome of this fcli invocation. Can be referenced in subsequent steps using ${name}.") @JsonProperty(required = false) private String name; - @JsonPropertyDescription("Optional: Steps to be executed for each individual record generated by the given fcli invocation.") + @JsonPropertyDescription("Optional object: Steps to be executed for each individual record generated by the given fcli invocation.") @JsonProperty(value = "forEach", required = false) private ActionStepFcli.ActionStepFcliForEachDescriptor forEach; /** diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepForEach.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepForEach.java index eceb3eddff..24120ee715 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepForEach.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepForEach.java @@ -33,10 +33,10 @@ public final class ActionStepForEach extends AbstractActionStepForEach { /** Processor that runs the forEach steps. This expression must evaluate to an * IActionStepForEachProcessor instance. */ - @JsonPropertyDescription("Required if 'values' not specified: Reference to a processor that generates JSON records and executes the given steps for each record. For now, the only available processor is ${#ssc.ruleDescriptionsProcessor(parameters.appversion.id)} for processing rule descriptions from the current state FPR file, used by some built-in actions.") + @JsonPropertyDescription("Required SpEL template expression if 'values' not specified: Reference to a processor that generates JSON records and executes the given steps for each record. For now, the only available processor is ${#ssc.ruleDescriptionsProcessor(parameters.appversion.id)} for processing rule descriptions from the current state FPR file, used by some built-in actions.") @JsonProperty(required = false) private TemplateExpression processor; - @JsonPropertyDescription("Required if 'processor' not specified: Array of values to be iterated over.") + @JsonPropertyDescription("Required SpEL template expression if 'processor' not specified: Array of values to be iterated over.") @JsonProperty(required = false) private TemplateExpression values; public final void _postLoad(Action action) {} diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepRequest.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepRequest.java index 80bc6822bf..1da2125841 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepRequest.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepRequest.java @@ -32,37 +32,37 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepRequest extends AbstractActionStep { - @JsonPropertyDescription("Required: Name to assign to the JSON response for this REST request. Can be referenced in subsequent steps using ${name} to access transformed data (if applicable) or ${name_raw} to access raw, untransformed data.") + @JsonPropertyDescription("Required string: Name to assign to the JSON response for this REST request. Can be referenced in subsequent steps using ${name} to access transformed data (if applicable) or ${name_raw} to access raw, untransformed data.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Optional: HTTP method like GET or POST to use for this REST request. Defaults to 'GET'.") + @JsonPropertyDescription("Optional string: HTTP method like GET or POST to use for this REST request. Defaults to 'GET'.") @JsonProperty(required = false, defaultValue = "GET") private String method = HttpMethod.GET.name(); - @JsonPropertyDescription("Required: Unqualified REST URI, like '/api/v3/some/api/${parameters.name.id}' to be appended to the base URL as configured for the given 'target'.") + @JsonPropertyDescription("Required SpEL template expression: Unqualified REST URI, like '/api/v3/some/api/${parameters.name.id}' to be appended to the base URL as configured for the given 'target'.") @JsonProperty(required = true) private TemplateExpression uri; - @JsonPropertyDescription("Required if no default target has been configured through defaults.requestTarget: Target on which to execute the REST request. This may be 'fod' (for actions in FoD module), 'ssc' (for actions in SSC module), or a custom request target as configured through 'addRequestTargets'.") + @JsonPropertyDescription("Required string if no default target has been configured through defaults.requestTarget: Target on which to execute the REST request. This may be 'fod' (for actions in FoD module), 'ssc' (for actions in SSC module), or a custom request target as configured through 'addRequestTargets'.") @JsonProperty(required = false) private String target; - @JsonPropertyDescription("Optional: Map of query parameters and corresponding values, for example 'someParam: ${name.property}'.") + @JsonPropertyDescription("Optional map: Map of query parameters and corresponding values, for example 'someParam: ${name.property}'.") @JsonProperty(required = false) private Map query; - @JsonPropertyDescription("Optional: Request body to send with the REST request.") + @JsonPropertyDescription("Optional SpEL template expression: Request body to send with the REST request.") @JsonProperty(required = false) private TemplateExpression body; - @JsonPropertyDescription("Optional: Flag to indicate whether this is a 'paged' or 'simple' request. If set to 'paged' (only available for 'fod' and 'ssc' request targets for now), all pages will be automatically processed. Defaults to 'simple'.") + @JsonPropertyDescription("Optional enum value: Flag to indicate whether this is a 'paged' or 'simple' request. If set to 'paged' (only available for 'fod' and 'ssc' request targets for now), all pages will be automatically processed. Defaults to 'simple'.") @JsonProperty(required = false, defaultValue = "simple") private ActionStepRequest.ActionStepRequestType type = ActionStepRequestType.simple; - @JsonPropertyDescription("Optional: Progress messages for various stages of request/response processing.") + @JsonPropertyDescription("Optional object: Progress messages for various stages of request/response processing.") @JsonProperty(required = false) private ActionStepRequest.ActionStepRequestPagingProgressDescriptor pagingProgress; - @JsonPropertyDescription("Optional: Steps to be executed on the overall response before executing any 'forEach' steps.") + @JsonPropertyDescription("Optional list: Steps to be executed on the overall response before executing any 'forEach' steps.") @JsonProperty(required = false) private List onResponse; - @JsonPropertyDescription("Optional: Steps to be executed on request failure. If not specified, an exception will be thrown on request failure.") + @JsonPropertyDescription("Optional list: Steps to be executed on request failure. If not specified, an exception will be thrown on request failure.") @JsonProperty(required = false) private List onFail; - @JsonPropertyDescription("Optional: Steps to be executed for each record in the REST response.") + @JsonPropertyDescription("Optional object: Steps to be executed for each record in the REST response.") @JsonProperty(required = false) private ActionStepRequest.ActionStepRequestForEachDescriptor forEach; /** diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepUnset.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepUnset.java index a1cc9a1de5..b8ab78f37f 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepUnset.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepUnset.java @@ -26,7 +26,7 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepUnset extends AbstractActionStep { - @JsonPropertyDescription("Required: Name to unset.") + @JsonPropertyDescription("Required string: Name to unset.") @JsonProperty(required = true) private String name; public void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepWrite.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepWrite.java index 0c5292e16d..d9d605cc3a 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepWrite.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionStepWrite.java @@ -27,13 +27,13 @@ @Reflectable @NoArgsConstructor @Data @EqualsAndHashCode(callSuper = true) public final class ActionStepWrite extends AbstractActionStep implements IActionStepValueSupplier { - @JsonPropertyDescription("Required: SpEL template expression defining where to write the given data; either 'stdout', 'stderr' or a filename.") + @JsonPropertyDescription("Required SpEL template expression: Specify where to write the given data; either 'stdout', 'stderr' or a filename.") @JsonProperty(required = true) private TemplateExpression to; - @JsonPropertyDescription("Required if 'valueTemplate' is not specified: Value to be written to the given output.") + @JsonPropertyDescription("Required SpEL template expression if 'valueTemplate' is not specified: Value to be written to the given output.") @JsonProperty(required = false) private TemplateExpression value; - @JsonPropertyDescription("Required if 'value' is not specified: Name of a value template to be evaluated, writing the outcome of the value template to the given output.") + @JsonPropertyDescription("Required string if 'value' is not specified: Name of a value template to be evaluated, writing the outcome of the value template to the given output.") @JsonProperty(required = false) private String valueTemplate; public void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionUsage.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionUsage.java index 2e57301bef..cfb8050027 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionUsage.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionUsage.java @@ -25,10 +25,10 @@ @Reflectable @NoArgsConstructor @Data public final class ActionUsage implements IActionElement { - @JsonPropertyDescription("Required: Action usage header, displayed in list and help outputs") + @JsonPropertyDescription("Required string: Action usage header, displayed in list and help outputs") @JsonProperty(required = true) private String header; - @JsonPropertyDescription("Required: Action usage description, displayed in help output") + @JsonPropertyDescription("Required string: Action usage description, displayed in help output") @JsonProperty(required = true) private String description; public void postLoad(Action action) { diff --git a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionValueTemplate.java b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionValueTemplate.java index 2b9a329ada..3101a04901 100644 --- a/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionValueTemplate.java +++ b/fcli-core/fcli-common/src/main/java/com/fortify/cli/common/action/model/ActionValueTemplate.java @@ -38,10 +38,10 @@ @Reflectable @NoArgsConstructor @Data public final class ActionValueTemplate implements IActionElement { - @JsonPropertyDescription("Required: Name of this value template.") + @JsonPropertyDescription("Required string: Name of this value template.") @JsonProperty(required = true) private String name; - @JsonPropertyDescription("Required: Text or structured JSON contents, where each text node is assumed to be a template expression.") + @JsonPropertyDescription("Required object|string: Text or structured JSON contents, where each text node is assumed to be a template expression.") @JsonProperty(required = true) private JsonNode contents; /** Cached mapping from text node property path to corresponding TemplateExpression instance */