Skip to content

Add @JsonInclude(NON_ABSENT) to optional fields in SetSuggestedPromptsParams - #466

Merged
opaliukh merged 2 commits into
masterfrom
add-json-include-non-absent-suggested-prompts
Jul 29, 2026
Merged

Add @JsonInclude(NON_ABSENT) to optional fields in SetSuggestedPromptsParams#466
opaliukh merged 2 commits into
masterfrom
add-json-include-non-absent-suggested-prompts

Conversation

@opaliukh

Copy link
Copy Markdown
Contributor

Without this annotation, Optional.empty() fields are serialized as null in the JSON payload, which the Slack API may reject or misinterpret.

…sParams

Without this annotation, Optional.empty() fields are serialized as null
in the JSON payload, which the Slack API may reject or misinterpret.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@opaliukh
opaliukh requested a review from yyakhnytsia July 29, 2026 09:49

@yyakhnytsia yyakhnytsia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reviewed, left comment.

return getChannelId();
}

@JsonInclude(JsonInclude.Include.NON_ABSENT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What if we put this annotation in the class level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

Same behavior, cleaner — applies to all optional fields without
repeating the annotation on each getter.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@opaliukh
opaliukh requested a review from yyakhnytsia July 29, 2026 10:15

@yyakhnytsia yyakhnytsia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@opaliukh
opaliukh merged commit 51665cd into master Jul 29, 2026
2 checks passed
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.

2 participants