Closed Falit closed 3 months ago
Hi @Falit thanks for writing in!
It does seem like some of the models in RichTextSectionElement.java do not match their documented definition from Rich text element types
From what I can understand changing these models may be a breaking change, @seratch not sure how we want to address this, maybe we could strip non existing fields when converting java -> json
🤔
Hi @Falit, thank you so much for taking the time to report this!
@WilliamBergamin I don't think this is a breaking change because currently working code customers rely on should not use the code property for those block elements. This is a bug fix, which resolves an existing issue.
While checking this, I found that a few other properties, which did not exist when we initially added these classes, are missing in the class definition. I've resolved the issue too in #1337 pull request.
We are trying to utilise Rich Text Block as Input , the user can add some placeholder ( we are using something like ${current}) and we would replace it with mentioning user.
We are facing issues wrt Rich Text Block and subsequent json format
Now, when we try to paste this in block kit builder or try sending this on UI, then it says "invalid additional property code".
On checking the commits : We think this commit is the issue , since the User object -> style object shouldn't have code attribute as mentioned here](https://api.slack.com/reference/block-kit/blocks#user-element-type)
Are there inconsistencies in Rich text block Java class and Rich text block json version?
Reproducible in:
The Slack SDK version
(Paste the output of
mvn dependency:tree | grep com.slack.api
orgradle dependencies | grep com.slack.api
)Java Runtime version
(Paste the output of
java -version
) java 11.0.16 2022-07-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.16+11-LTS-199) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.16+11-LTS-199, mixed mode)OS info
Mac Os ProductName: macOS ProductVersion: 12.0.1 BuildVersion: 21A559 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000
Steps to reproduce:
(Share the commands to run, source code, and project settings (e.g., pom.xml/build.gradle))
Expected result:
Actual result:
error : invalid additional property code
On checking the commits : We think this commit is the issue , since the User object -> style object shouldn't have code attribute as mentioned here](https://api.slack.com/reference/block-kit/blocks#user-element-type)