slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
571 stars 212 forks source link

block_suggestion response does not support description in an option #1343

Closed ESteanes closed 3 weeks ago

ESteanes commented 1 month ago

https://api.slack.com/reference/block-kit/composition-objects#option

We should be able to add a plain text description to an option object - this is possible using the API but is not available in the SDK

Category (place an x in each of the [ ])

Requirements

Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

seratch commented 1 month ago

Hi @ESteanes, thanks for writing in! This class represents the option data structure and it has the description fileld! Hope this helps.

ESteanes commented 1 month ago

In that case, are we able to make BlockSuggestions accept the OptionObject class?

My use case: I've got an External options field https://api.slack.com/reference/block-kit/block-elements#external_multi_select and maybe its not supported by the API officially but in a previous Go bot I was able to push OptionObjects in that BlockSuggestionResponse.

seratch commented 1 month ago

@ESteanes Oh, I see. The option value didn't support description in the past, but indeed, having a description is now feasible. The class needs to be updated to support the use case. Thanks for reporting this issue! We will resolve it in the next patch version release.