Skip to content
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

MAINT: add json property descriptions for kv configs #4747

Conversation

shenkw1
Copy link
Contributor

@shenkw1 shenkw1 commented Jul 16, 2024

Description

This PR serves as the starter for plugin config table into @JsonPropertyDescription so that a complete JSON schema can be generated for the Key-Value Processor.

Issues Resolved

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

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.

private boolean strictGrouping = false;

@JsonProperty("string_literal_character")
@JsonPropertyDescription("Can be set to either a single quotation mark (`'`) or a double quotation mark (`\"`). " +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description specifies the valid values but not what this parameter means. I would suggest include the text from the example column (https://opensearch.org/docs/latest/data-prepper/pipelines/configuration/processors/key-value/). Somehow the example text explains what the parameter means in the documentation.

private String keyValueWhen;

@JsonProperty("strict_grouping")
@JsonPropertyDescription("Specifies whether strict grouping should be enabled when the `value_grouping` " +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Let's include the text in the example column as well for this parameter.

@shenkw1 shenkw1 force-pushed the add-docs-in-json-property-description-for-key-value-processor branch 2 times, most recently from 823d156 to 5c68a53 Compare July 18, 2024 17:48
Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Katherine Shen <katshen@amazon.com>
@shenkw1 shenkw1 force-pushed the add-docs-in-json-property-description-for-key-value-processor branch from 5c68a53 to 2b3c018 Compare July 18, 2024 17:54
oeyh
oeyh previously approved these changes Jul 18, 2024
dlvenable
dlvenable previously approved these changes Jul 18, 2024
@dlvenable
Copy link
Member

@shenkw1 , You have a checkstyle error:
Error: eckstyle] [ERROR] /home/runner/work/data-prepper/data-prepper/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessorConfig.java:8:8: Unused import - com.fasterxml.jackson.annotation.JsonClassDescription. [UnusedImports]

Signed-off-by: Katherine Shen <katshen@amazon.com>
@shenkw1 shenkw1 dismissed stale reviews from dlvenable and oeyh via 9d33cdf July 19, 2024 14:38
@dlvenable dlvenable merged commit aa58f3a into opensearch-project:main Jul 19, 2024
43 of 47 checks passed
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 23, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Jul 30, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 8, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 12, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
kkondaka pushed a commit to kkondaka/kk-data-prepper-f2 that referenced this pull request Aug 14, 2024
…ect#4747)

add json property descriptions for kv configs

Signed-off-by: Katherine Shen <katshen@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
@shenkw1 shenkw1 deleted the add-docs-in-json-property-description-for-key-value-processor branch October 15, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants