-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: backfill @AlsoRequired annotation to processor attributes #5086
ENH: backfill @AlsoRequired annotation to processor attributes #5086
Conversation
Signed-off-by: George Chen <qchea@amazon.com>
…cessors Signed-off-by: George Chen <qchea@amazon.com>
@JsonPropertyDescription("Specifies whether to group values using predefined grouping delimiters. " + | ||
"If this flag is enabled, then the content between the delimiters is considered to be one entity and " + | ||
"they are not parsed as key-value pairs. The following characters are used a group delimiters: " + | ||
"<code>{...}</code>, <code>[...]</code>, <code><...></code>, <code>(...)</code>, <code>\"...\"</code>, <code>'...'</code>, <code>http://... (space)</code>, and <code>https:// (space)</code>. " + | ||
"Default is <code>false</code>. For example, if <code>value_grouping</code> is <code>true</code>, then " + | ||
"<code>{\"key1=[a=b,c=d]&key2=value2\"}</code> parses to <code>{\"key1\": \"[a=b,c=d]\", \"key2\": \"value2\"}</code>.") | ||
@AlsoRequired(values = { | ||
@AlsoRequired.Required(name = FIELD_DELIMITER_REGEX_KEY, allowedValues = {"null"}) | ||
}) | ||
private boolean valueGrouping = false; | ||
|
||
@JsonProperty(value = "recursive", defaultValue = "false") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recursive config has a restriction where remove_brackets must be false, skip_duplicate_values is always true, and whitespace is always strict
Signed-off-by: George Chen <qchea@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a merge conflict.
Also, there're some other cases that the annotation can be added:
list_to_map: key is required if use_source_key
is false
translate: under targets, map and regex are mutually exclusive
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
Signed-off-by: George Chen <qchea@amazon.com>
@oeyh Thanks for the catch!
We might need separate annotation to capture this case. |
Description
This PR backfills @AlsoRequired annotation to processor attributes for schema generation purpose:
aggregate:
flatten:
key_value:
add_entry:
convert_entry:
copy_value
split string:
split event:
Example schema after this change:
Issues Resolved
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.