Skip to content

Commit

Permalink
Updates JsonPropertyDescription annotations to use HTML rather than M…
Browse files Browse the repository at this point in the history
…arkdown. (opensearch-project#4985)

Signed-off-by: David Venable <[email protected]>
  • Loading branch information
dlvenable authored Oct 2, 2024
1 parent db9a849 commit 99da08a
Show file tree
Hide file tree
Showing 33 changed files with 199 additions and 199 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class AggregateProcessorConfig {
@JsonProperty("aggregated_events_tag")
private String aggregatedEventsTag;

@JsonPropertyDescription("A Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), such as '/some-key == \"test\"', that will be evaluated to determine whether the processor will be run on the event.")
@JsonPropertyDescription("A Data Prepper <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as '/some-key == \"test\"', that will be evaluated to determine whether the processor will be run on the event.")
@JsonProperty("aggregate_when")
private String whenCondition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public class TailSamplerAggregateActionConfig {
@NotNull
private Duration waitPeriod;

@JsonPropertyDescription("Percent value to use for sampling non error events. 0.0 < percent < 100.0")
@JsonPropertyDescription("Percent value to use for sampling non error events. 0.0 &lt; percent &lt; 100.0")
@JsonProperty("percent")
@NotNull
private Integer percent;

@JsonPropertyDescription("A Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), such as '/some-key == \"test\"', that will be evaluated to determine whether the event is an error event or not")
@JsonPropertyDescription("A Data Prepper <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as '/some-key == \"test\"', that will be evaluated to determine whether the event is an error event or not")
@JsonProperty("condition")
private String condition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class StringProcessor implements Processor<Record<Event>, Record<Event>>
@JsonPropertyOrder
@JsonClassDescription("The `string_converter` processor converts a string to uppercase or lowercase.")
public static class Configuration {
@JsonPropertyDescription("Whether to convert to uppercase (`true`) or lowercase (`false`).")
@JsonPropertyDescription("Whether to convert to uppercase (<code>true</code>) or lowercase (<code>false</code>).")
private boolean upperCase = true;

public boolean getUpperCase() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,44 @@ public class CsvProcessorConfig {
static final Boolean DEFAULT_DELETE_HEADERS = true;

@JsonProperty("source")
@JsonPropertyDescription("The field in the event that will be parsed. Default value is `message`.")
@JsonPropertyDescription("The field in the event that will be parsed. Default value is <code>message</code>.")
private String source = DEFAULT_SOURCE;

@JsonProperty("delimiter")
@JsonPropertyDescription("The character separating each column. Default value is `,`.")
@JsonPropertyDescription("The character separating each column. Default value is <code>,</code>.")
private String delimiter = DEFAULT_DELIMITER;

@JsonProperty("delete_header")
@JsonPropertyDescription("If specified, the event header (`column_names_source_key`) is deleted after the event " +
@JsonPropertyDescription("If specified, the event header (<code>column_names_source_key</code>) is deleted after the event " +
"is parsed. If there is no event header, no action is taken. Default value is true.")
private Boolean deleteHeader = DEFAULT_DELETE_HEADERS;

@JsonProperty("quote_character")
@JsonPropertyDescription("The character used as a text qualifier for a single column of data. " +
"Default value is `\"`.")
"Default value is <code>\"</code>.")
private String quoteCharacter = DEFAULT_QUOTE_CHARACTER;

@JsonProperty("column_names_source_key")
@JsonPropertyDescription("The field in the event that specifies the CSV column names, which will be " +
"automatically detected. If there need to be extra column names, the column names are automatically " +
"generated according to their index. If `column_names` is also defined, the header in " +
"`column_names_source_key` can also be used to generate the event fields. " +
"generated according to their index. If <code>column_names</code> is also defined, the header in " +
"<code>column_names_source_key</code> can also be used to generate the event fields. " +
"If too few columns are specified in this field, the remaining column names are automatically generated. " +
"If too many column names are specified in this field, the CSV processor omits the extra column names.")
private String columnNamesSourceKey;

@JsonProperty("column_names")
@JsonPropertyDescription("User-specified names for the CSV columns. " +
"Default value is `[column1, column2, ..., columnN]` if there are no columns of data in the CSV " +
"record and `column_names_source_key` is not defined. If `column_names_source_key` is defined, " +
"the header in `column_names_source_key` generates the event fields. If too few columns are specified " +
"Default value is <code>[column1, column2, ..., columnN]</code> if there are no columns of data in the CSV " +
"record and <code>column_names_source_key</code> is not defined. If <code>column_names_source_key</code> is defined, " +
"the header in <code>column_names_source_key</code> generates the event fields. If too few columns are specified " +
"in this field, the remaining column names are automatically generated. " +
"If too many column names are specified in this field, the CSV processor omits the extra column names.")
private List<String> columnNames;

@JsonProperty("csv_when")
@JsonPropertyDescription("Allows you to specify a Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), " +
"such as `/some-key == \"test\"`, that will be evaluated to determine whether " +
@JsonPropertyDescription("Allows you to specify a Data Prepper <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether " +
"the processor should be applied to the event.")
private String csvWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ public class DateProcessorConfig {
public static class DateMatch {
@JsonProperty("key")
@JsonPropertyDescription("Represents the event key against which to match patterns. " +
"Required if `match` is configured. ")
"Required if <code>match</code> is configured.")
private String key;
@JsonProperty("patterns")
@JsonPropertyDescription("A list of possible patterns that the timestamp value of the key can have. The patterns " +
"are based on a sequence of letters and symbols. The `patterns` support all the patterns listed in the " +
"are based on a sequence of letters and symbols. The <code>patterns</code> support all the patterns listed in the " +
"Java DateTimeFormatter (https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) reference. " +
"The timestamp value also supports `epoch_second`, `epoch_milli`, and `epoch_nano` values, " +
"The timestamp value also supports <code>epoch_second</code>, <code>epoch_milli</code>, and <code>epoch_nano</code> values, " +
"which represent the timestamp as the number of seconds, milliseconds, and nanoseconds since the epoch. " +
"Epoch values always use the UTC time zone.")
private List<String> patterns;
Expand Down Expand Up @@ -98,29 +98,29 @@ public static boolean isValidPattern(final String pattern) {
}

@JsonProperty("from_time_received")
@JsonPropertyDescription("When `true`, the timestamp from the event metadata, " +
@JsonPropertyDescription("When <code>true</code>, the timestamp from the event metadata, " +
"which is the time at which the source receives the event, is added to the event data. " +
"This option cannot be defined at the same time as `match`. Default is `false`.")
"This option cannot be defined at the same time as <code>match</code>. Default is <code>false</code>.")
private Boolean fromTimeReceived = DEFAULT_FROM_TIME_RECEIVED;

@JsonProperty("to_origination_metadata")
@JsonPropertyDescription("When `true`, the matched time is also added to the event's metadata as an instance of " +
"`Instant`. Default is `false`.")
@JsonPropertyDescription("When <code>true</code>, the matched time is also added to the event's metadata as an instance of " +
"<code>Instant</code>. Default is <code>false</code>.")
private Boolean toOriginationMetadata = DEFAULT_TO_ORIGINATION_METADATA;

@JsonProperty("match")
@JsonPropertyDescription("The date match configuration. " +
"This option cannot be defined at the same time as `from_time_received`. There is no default value.")
"This option cannot be defined at the same time as <code>from_time_received</code>. There is no default value.")
private List<DateMatch> match;

@JsonProperty("destination")
@JsonPropertyDescription("The field used to store the timestamp parsed by the date processor. " +
"Can be used with both `match` and `from_time_received`. Default is `@timestamp`.")
"Can be used with both <code>match</code> and <code>from_time_received</code>. Default is <code>@timestamp</code>.")
private String destination = DEFAULT_DESTINATION;

@JsonProperty("output_format")
@JsonPropertyDescription("Determines the format of the timestamp added to an event. " +
"Default is `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`.")
"Default is <code>yyyy-MM-dd'T'HH:mm:ss.SSSXXX</code>.")
private String outputFormat = DEFAULT_OUTPUT_FORMAT;

@JsonProperty("source_timezone")
Expand All @@ -131,23 +131,23 @@ public static boolean isValidPattern(final String pattern) {
private String sourceTimezone = DEFAULT_SOURCE_TIMEZONE;

@JsonProperty("destination_timezone")
@JsonPropertyDescription("The time zone used for storing the timestamp in the `destination` field. " +
@JsonPropertyDescription("The time zone used for storing the timestamp in the <code>destination</code> field. " +
"A list of all the available time zones is contained in the TZ database name column of " +
"(https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List).")
private String destinationTimezone = DEFAULT_DESTINATION_TIMEZONE;

@JsonProperty("locale")
@JsonPropertyDescription("The location used for parsing dates. Commonly used for parsing month names (`MMM`). " +
"The value can contain language, country, or variant fields in IETF BCP 47, such as `en-US`, " +
@JsonPropertyDescription("The location used for parsing dates. Commonly used for parsing month names (<code>MMM</code>). " +
"The value can contain language, country, or variant fields in IETF BCP 47, such as <code>en-US</code>, " +
"or a string representation of the " +
"locale (https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html) object, such as `en_US`. " +
"locale (https://docs.oracle.com/javase/8/docs/api/java/util/Locale.html) object, such as <code>en_US</code>. " +
"A full list of locale fields, including language, country, and variant, can be found in " +
"(https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). " +
"Default is `Locale.ROOT`.")
"Default is <code>Locale.ROOT</code>.")
private String locale;

@JsonProperty("date_when")
@JsonPropertyDescription("Specifies under what condition the `date` processor should perform matching. " +
@JsonPropertyDescription("Specifies under what condition the <code>date</code> processor should perform matching. " +
"Default is no condition.")
private String dateWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
public class DissectProcessorConfig {
@NotNull
@JsonProperty("map")
@JsonPropertyDescription("Defines the `dissect` patterns for specific keys. For details on how to define fields " +
"in the `dissect` pattern, see (https://opensearch.org/docs/latest/data-prepper/pipelines/configuration/processors/dissect/#field-notations).")
@JsonPropertyDescription("Defines the <code>dissect</code> patterns for specific keys. For details on how to define fields " +
"in the <code>dissect</code> pattern, see (https://opensearch.org/docs/latest/data-prepper/pipelines/configuration/processors/dissect/#field-notations).")
private Map<String, String> map;
@JsonProperty("target_types")
@JsonPropertyDescription("Specifies the data types for extract fields. Valid options are `integer`, " +
"`double`, `string`, `long`, `big_decimal`, and `boolean`. By default, all fields are of the `string` type.")
@JsonPropertyDescription("Specifies the data types for extract fields. Valid options are <code>integer</code>, " +
"<code>double</code>, <code>string</code>, <code>long</code>, <code>big_decimal</code>, and <code>boolean</code>. By default, all fields are of the <code>string</code> type.")
private Map<String, TargetType> targetTypes;
@JsonProperty("dissect_when")
@JsonPropertyDescription("Specifies a condition for performing the `dissect` operation using a Data Prepper [conditional expression]" +
"(https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/). " +
"If specified, the `dissect` operation will only run when the expression evaluates to true.")
@JsonPropertyDescription("Specifies a condition for performing the <code>dissect</code> operation using a " +
"<a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">Data Prepper Expression Syntax</a>. " +
"If specified, the <code>dissect</code> operation will only run when the expression evaluates to true.")
private String dissectWhen;

public String getDissectWhen(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@JsonClassDescription("The `drop_events` processor drops all the events that are passed into it.")
public class DropEventProcessorConfig {

@JsonPropertyDescription("Accepts a Data Prepper conditional expression string following the [Data Prepper Expression Syntax](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/). Configuring drop_events with drop_when: true drops all the events received.")
@JsonPropertyDescription("Accepts a Data Prepper conditional expression string following the <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">Data Prepper Expression Syntax</a>. Configuring drop_events with drop_when: true drops all the events received.")
@JsonProperty("drop_when")
@NotEmpty
private String dropWhen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,39 @@ public class FlattenProcessorConfig {

@NotNull
@JsonProperty("source")
@JsonPropertyDescription("The source key on which to perform the operation. If set to an empty string (`\"\"`), " +
@JsonPropertyDescription("The source key on which to perform the operation. If set to an empty string (<code>\"\"</code>), " +
"then the processor uses the root of the event as the source.")
private String source;

@NotNull
@JsonProperty("target")
@JsonPropertyDescription("The target key to put into the flattened fields. If set to an empty string (`\"\"`), " +
@JsonPropertyDescription("The target key to put into the flattened fields. If set to an empty string (<code>\"\"</code>) " +
"then the processor uses the root of the event as the target.")
private String target;

@JsonProperty("remove_processed_fields")
@JsonPropertyDescription("When `true`, the processor removes all processed fields from the source. Default is `false`.")
@JsonPropertyDescription("When <code>true</code>, the processor removes all processed fields from the source. Default is <code>false</code>.")
private boolean removeProcessedFields = false;

@JsonProperty("remove_list_indices")
@JsonPropertyDescription("When `true`, the processor converts the fields from the source map into lists and " +
"puts the lists into the target field. Default is `false`.")
@JsonPropertyDescription("When <code>true</code>, the processor converts the fields from the source map into lists and " +
"puts the lists into the target field. Default is <code>false</code>.")
private boolean removeListIndices = false;

@JsonProperty("remove_brackets")
@JsonPropertyDescription("When `true`, the processor also removes brackets around the indices. Can only be " +
"set to `true` when `remove_list_indices` is `true`.")
@JsonPropertyDescription("When <code>true</code>, the processor also removes brackets around the indices. Can only be " +
"set to <code>true</code> when <code>remove_list_indices</code> is <code>true</code>.")
private boolean removeBrackets = false;

@JsonProperty("exclude_keys")
@JsonPropertyDescription("The keys from the source field that should be excluded from processing. " +
"Default is an empty list (`[]`).")
"Default is an empty list (<code>[]</code>).")
private List<String> excludeKeys = DEFAULT_EXCLUDE_KEYS;

@JsonProperty("flatten_when")
@JsonPropertyDescription("A Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), " +
"such as `/some-key == \"test\"'`, that determines whether the `flatten` processor will be run on the " +
"event. Default is `null`, which means that all events will be processed unless otherwise stated.")
@JsonPropertyDescription("A Data Prepper <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that determines whether the <code>flatten</code> processor will be run on the " +
"event. Default is <code>null</code>, which means that all events will be processed unless otherwise stated.")
private String flattenWhen;

@JsonProperty("tags_on_failure")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ public class GeoIPProcessorConfig {
private List<String> tagsOnNoValidIp;

@JsonProperty("geoip_when")
@JsonPropertyDescription("Specifies a condition for including Events in the `geoip` processor using a Data Prepper [conditional expression]" +
@JsonPropertyDescription("Specifies a condition for including Events in the <code>geoip</code> processor using a Data Prepper [conditional expression]" +
"(https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/)." +
" If specified, the `geoip` processor will only run when the expression evaluates to true.")
" If specified, the <code>geoip</code> processor will only run when the expression evaluates to true.")
private String whenCondition;

/**
Expand Down
Loading

0 comments on commit 99da08a

Please sign in to comment.