Describe the bug
When sending a payload that contains BlockKit with a StaticSelectMenu or StaticMultiSelectMenu (and likely ExternalMultiSelectMenu though I haven't tested that), the request goes through fine but deserializing the response (if it includes the view just sent) will fail with an error like so:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.hubspot.slack.client.models.blocks.objects.OptionOrOptionGroup` (no Creators, like default construct, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.hubspot.slack.client.models.response.views.ModalViewCommandResponse$Json["view"]->com.hubspot.slack.client.models.response.views.ModalViewResponse$Json["blocks"]->java.util.ArrayList[2]->com.hubspot.slack.client.models.blocks.Section$Json["accessory"]->com.hubspot.slack.client.models.blocks.elements.StaticSelectMenu$Json["initial_option"])
It appears Jackson needs a bit of extra coaching to be told how to deserialize the OptionOrOptionGroup fields in those objects. The pattern used elsewhere (ex: @JsonSubTypes) doesn't quite work here since there isn't a clear type indicator. Unfortunately, my Jackson skills aren't strong enough to get you a PR right now, so logging this bug until I gain said skills :)
Describe the bug When sending a payload that contains BlockKit with a
StaticSelectMenu
orStaticMultiSelectMenu
(and likelyExternalMultiSelectMenu
though I haven't tested that), the request goes through fine but deserializing the response (if it includes the view just sent) will fail with an error like so:It appears Jackson needs a bit of extra coaching to be told how to deserialize the
OptionOrOptionGroup
fields in those objects. The pattern used elsewhere (ex:@JsonSubTypes
) doesn't quite work here since there isn't a clear type indicator. Unfortunately, my Jackson skills aren't strong enough to get you a PR right now, so logging this bug until I gain said skills :)Thanks!